pub struct NullHandler;Expand description
Discards every event. Zero-overhead substitute when monitoring is disabled in a release build.
Trait Implementations§
Source§impl Clone for NullHandler
impl Clone for NullHandler
Source§fn clone(&self) -> NullHandler
fn clone(&self) -> NullHandler
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 moreimpl Copy for NullHandler
Source§impl Debug for NullHandler
impl Debug for NullHandler
Source§impl Default for NullHandler
impl Default for NullHandler
Source§fn default() -> NullHandler
fn default() -> NullHandler
Returns the “default value” for a type. Read more
Source§impl WatermarkHandler for NullHandler
impl WatermarkHandler for NullHandler
Source§fn on_warn(&self, _event: WatermarkEvent)
fn on_warn(&self, _event: WatermarkEvent)
Called once per crossing of the
warn_pct threshold (rising edge).Source§fn on_critical(&self, _event: WatermarkEvent)
fn on_critical(&self, _event: WatermarkEvent)
Called once per crossing of the
critical_pct threshold (rising edge).Source§fn on_oom(&self, _event: WatermarkEvent)
fn on_oom(&self, _event: WatermarkEvent)
Called when an allocation returns
AllocError.Auto Trait Implementations§
impl Freeze for NullHandler
impl RefUnwindSafe for NullHandler
impl Send for NullHandler
impl Sync for NullHandler
impl Unpin for NullHandler
impl UnsafeUnpin for NullHandler
impl UnwindSafe for NullHandler
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