pub struct NoopEventListener;Expand description
Listener that intentionally ignores every event.
Useful as a default in hosts where event observation is optional and in
tests that need to satisfy an EventListener dependency.
Trait Implementations§
Source§impl Clone for NoopEventListener
impl Clone for NoopEventListener
Source§fn clone(&self) -> NoopEventListener
fn clone(&self) -> NoopEventListener
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NoopEventListener
impl Debug for NoopEventListener
Source§impl Default for NoopEventListener
impl Default for NoopEventListener
Source§fn default() -> NoopEventListener
fn default() -> NoopEventListener
Returns the “default value” for a type. Read more
Source§impl EventListener for NoopEventListener
impl EventListener for NoopEventListener
Source§fn on_event<'life0, 'life1, 'async_trait>(
&'life0 self,
_event: &'life1 Event,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
NoopEventListener: 'async_trait,
fn on_event<'life0, 'life1, 'async_trait>(
&'life0 self,
_event: &'life1 Event,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
NoopEventListener: 'async_trait,
Called for every event, durable and ephemeral, in emission order. Read more
Auto Trait Implementations§
impl Freeze for NoopEventListener
impl RefUnwindSafe for NoopEventListener
impl Send for NoopEventListener
impl Sync for NoopEventListener
impl Unpin for NoopEventListener
impl UnsafeUnpin for NoopEventListener
impl UnwindSafe for NoopEventListener
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