pub struct TraceEmitter { /* private fields */ }Expand description
Shared handle to the trace broadcast channel.
Clone freely — each clone refers to the same underlying channel.
Implementations§
Source§impl TraceEmitter
impl TraceEmitter
pub fn new() -> Self
Sourcepub fn subscribe(&self) -> Receiver<MatchTraceEvent>
pub fn subscribe(&self) -> Receiver<MatchTraceEvent>
Subscribe to the event stream (in-process).
Sourcepub fn emit(
&self,
received_at_ms: u64,
duration_ms: u32,
request: RequestSummary,
outcome: Outcome,
)
pub fn emit( &self, received_at_ms: u64, duration_ms: u32, request: RequestSummary, outcome: Outcome, )
Emit one event. If the channel is full, the event is dropped and the internal drop counter incremented.
Sourcepub fn has_subscribers(&self) -> bool
pub fn has_subscribers(&self) -> bool
Returns true iff at least one receiver is currently active.
Trait Implementations§
Source§impl Clone for TraceEmitter
impl Clone for TraceEmitter
Source§fn clone(&self) -> TraceEmitter
fn clone(&self) -> TraceEmitter
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 moreAuto Trait Implementations§
impl Freeze for TraceEmitter
impl !RefUnwindSafe for TraceEmitter
impl Send for TraceEmitter
impl Sync for TraceEmitter
impl Unpin for TraceEmitter
impl UnsafeUnpin for TraceEmitter
impl !UnwindSafe for TraceEmitter
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