pub struct ScopedEmitter { /* private fields */ }Expand description
Run-scoped event emitter. Subsystems (tools, memory, middleware) receive one of
these so they don’t need to know about run_id or the monotonic seq counter — they
just call .emit(span_id, kind).
The plan’s context types show events: Arc<dyn EventSink> alone; in practice the
envelope needs a seq and run_id that the loop owns. This wrapper closes that
gap without changing the EventSink trait.
Implementations§
Source§impl ScopedEmitter
impl ScopedEmitter
pub fn new(sink: Arc<dyn EventSink>, run_id: RunId, seq: Arc<AtomicU64>) -> Self
pub fn sink(&self) -> &Arc<dyn EventSink> ⓘ
pub fn run_id(&self) -> RunId
pub fn next_seq(&self) -> u64
Trait Implementations§
Source§impl Clone for ScopedEmitter
impl Clone for ScopedEmitter
Source§fn clone(&self) -> ScopedEmitter
fn clone(&self) -> ScopedEmitter
Returns a duplicate of the value. Read more
1.0.0 · 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 ScopedEmitter
impl !RefUnwindSafe for ScopedEmitter
impl Send for ScopedEmitter
impl Sync for ScopedEmitter
impl Unpin for ScopedEmitter
impl UnsafeUnpin for ScopedEmitter
impl !UnwindSafe for ScopedEmitter
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