pub struct NoOpEmitter;Expand description
A no-op emitter for headless/test contexts.
Trait Implementations§
Source§impl EventEmitter for NoOpEmitter
impl EventEmitter for NoOpEmitter
fn emit(&self, _event: &str, _payload: Value)
Source§fn emit_json(&self, event: &str, payload: &RawValue)
fn emit_json(&self, event: &str, payload: &RawValue)
Emit already-serialised JSON. The default parses it for
EventEmitter::emit;
emitters that forward JSON as-is override this and EventEmitter::prefers_json.Source§fn prefers_json(&self) -> bool
fn prefers_json(&self) -> bool
Whether
EventEmitter::emit_json is cheaper than EventEmitter::emit here.Auto Trait Implementations§
impl Freeze for NoOpEmitter
impl RefUnwindSafe for NoOpEmitter
impl Send for NoOpEmitter
impl Sync for NoOpEmitter
impl Unpin for NoOpEmitter
impl UnsafeUnpin for NoOpEmitter
impl UnwindSafe for NoOpEmitter
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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