pub struct NullEmitter;Expand description
Emitter that throws away any diagnostic.
Any diagnostic emitted through this NullEmitter is completely discarded. This is useful when we are interested in the success or failure of something that may emit diagnostics but not in the diagnostics themselves. This is also equivalent to use a BatchEmitter without ever calling the commit() method, but is more efficient.
Trait Implementations§
Source§impl Emitter for NullEmitter
impl Emitter for NullEmitter
Source§fn emit(&self, _level: Level, _diag: Diagnostic)
fn emit(&self, _level: Level, _diag: Diagnostic)
Emit a diagnostic.
Source§fn note(&self, _kind: NoteKind, _note: Diagnostic)
fn note(&self, _kind: NoteKind, _note: Diagnostic)
Emit a note.
Auto Trait Implementations§
impl Freeze for NullEmitter
impl RefUnwindSafe for NullEmitter
impl Send for NullEmitter
impl Sync for NullEmitter
impl Unpin for NullEmitter
impl UnsafeUnpin for NullEmitter
impl UnwindSafe for NullEmitter
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
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