pub struct SpanRing<E: EventOps> { /* private fields */ }Expand description
2026-09-26: The in-flight spans over a fixed pool of event pairs.
Implementations§
Source§impl<E: EventOps> SpanRing<E>
impl<E: EventOps> SpanRing<E>
Sourcepub fn new(ops: E, slots: usize) -> Self
pub fn new(ops: E, slots: usize) -> Self
2026-09-26: slots event pairs, which ops must already hold.
pub fn slots(&self) -> usize
Sourcepub fn begin(
&self,
key: SpanKey,
stream: u64,
sink: &KernelInstruments,
) -> Option<SpanToken>
pub fn begin( &self, key: SpanKey, stream: u64, sink: &KernelInstruments, ) -> Option<SpanToken>
2026-09-26: Start a span on stream. None (and counted) when the next
slot is still in use or its start event could not be recorded.
Sourcepub fn end(&self, tok: SpanToken, stream: u64, sink: &KernelInstruments)
pub fn end(&self, tok: SpanToken, stream: u64, sink: &KernelInstruments)
2026-09-26: Close a span on stream. If the end event cannot be
recorded, the slot is freed and the failure counted.
Sourcepub fn harvest(&self, sink: &KernelInstruments) -> usize
pub fn harvest(&self, sink: &KernelInstruments) -> usize
2026-09-26: Land every completed span into sink; returns how many
landed. A pending span is left for a later harvest.
pub fn ops(&self) -> &E
Auto Trait Implementations§
impl<E> !Freeze for SpanRing<E>
impl<E> RefUnwindSafe for SpanRing<E>where
E: RefUnwindSafe,
impl<E> Send for SpanRing<E>
impl<E> Sync for SpanRing<E>
impl<E> Unpin for SpanRing<E>where
E: Unpin,
impl<E> UnwindSafe for SpanRing<E>where
E: UnwindSafe,
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