pub struct Warnings { /* private fields */ }Expand description
A sink that keeps warnings, with muted names and a per-name quota.
Implementations§
Source§impl Warnings
impl Warnings
Sourcepub fn record(&mut self, warning: Warning) -> Option<&Warning>
pub fn record(&mut self, warning: Warning) -> Option<&Warning>
Counts the warning and keeps it unless muted or over quota (notes are always kept); returns the kept warning.
Sourcepub fn into_warnings(self) -> Vec<Warning>
pub fn into_warnings(self) -> Vec<Warning>
The kept warnings, consuming the sink.
Sourcepub fn suppressed(&self) -> Vec<(String, u32)>
pub fn suppressed(&self) -> Vec<(String, u32)>
(name, count) for every name that went over its quota, sorted by name; muted names are
not listed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Warnings
impl RefUnwindSafe for Warnings
impl Send for Warnings
impl Sync for Warnings
impl Unpin for Warnings
impl UnsafeUnpin for Warnings
impl UnwindSafe for Warnings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().