pub struct CollectingTraceObserver { /* private fields */ }Expand description
A trace observer that collects events into a shared vector.
Primarily used for testing and debugging.
Implementations§
Source§impl CollectingTraceObserver
impl CollectingTraceObserver
Sourcepub fn drain(&self) -> Vec<TraceEvent>
pub fn drain(&self) -> Vec<TraceEvent>
Drain and return all collected events.
The collector protects a plain vector with no invariants, so lock poisoning is recovered from instead of cascading panics.
Trait Implementations§
Source§impl Clone for CollectingTraceObserver
impl Clone for CollectingTraceObserver
Source§impl Debug for CollectingTraceObserver
impl Debug for CollectingTraceObserver
Source§impl Default for CollectingTraceObserver
impl Default for CollectingTraceObserver
Source§impl TraceObserver for CollectingTraceObserver
impl TraceObserver for CollectingTraceObserver
Source§fn on_event(&self, event: &TraceEvent) -> OnEventAction
fn on_event(&self, event: &TraceEvent) -> OnEventAction
Called when a trace event occurs. Read more
Auto Trait Implementations§
impl Freeze for CollectingTraceObserver
impl RefUnwindSafe for CollectingTraceObserver
impl Send for CollectingTraceObserver
impl Sync for CollectingTraceObserver
impl Unpin for CollectingTraceObserver
impl UnsafeUnpin for CollectingTraceObserver
impl UnwindSafe for CollectingTraceObserver
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