pub struct SpanRef<'a> {
pub(crate) span: &'a Span,
pub(crate) store: &'a Store,
pub(crate) index: usize,
}Fields§
§span: &'a Span§store: &'a Store§index: usizeImplementations§
Source§impl<'a> SpanRef<'a>
impl<'a> SpanRef<'a>
pub fn id(&self) -> NonZeroUsize
pub fn index(&self) -> NonZeroUsize
pub fn parent(&self) -> Option<SpanRef<'a>>
pub fn start(&self) -> Timestamp
pub fn time_data(&self) -> &'a SpanTimeData
pub fn extra(&self) -> &'a SpanExtra
pub fn names(&self) -> &'a SpanNames
pub fn end(&self) -> Timestamp
pub fn is_complete(&self) -> bool
pub fn is_root(&self) -> bool
pub fn nice_name(&self) -> (&'a RcStr, &'a RcStr)
pub fn group_name(&self) -> (&'a RcStr, &'a RcStr)
pub fn args(&self) -> impl Iterator<Item = (&RcStr, &RcStr)>
pub fn self_time(&self) -> Timestamp
pub fn self_allocations(&self) -> u64
pub fn self_deallocations(&self) -> u64
pub fn self_persistent_allocations(&self) -> u64
pub fn self_allocation_count(&self) -> u64
pub fn self_span_count(&self) -> u64
Sourcepub fn events(&self) -> impl DoubleEndedIterator<Item = SpanEventRef<'a>>
pub fn events(&self) -> impl DoubleEndedIterator<Item = SpanEventRef<'a>>
Events sorted by start time, including self time and children.
Sourcepub fn children(
&self,
) -> impl DoubleEndedIterator<Item = SpanRef<'a>> + 'a + use<'a>
pub fn children( &self, ) -> impl DoubleEndedIterator<Item = SpanRef<'a>> + 'a + use<'a>
Children sorted by start time, excluding self time.
Sourcepub fn children_par(&self) -> impl ParallelIterator<Item = SpanRef<'a>> + 'a
pub fn children_par(&self) -> impl ParallelIterator<Item = SpanRef<'a>> + 'a
Children sorted by start time, excluding self time, in parallel.
pub fn total_time(&self) -> Timestamp
Sourcefn totals(&self) -> &'a SpanTotals
fn totals(&self) -> &'a SpanTotals
Compute (or fetch) the bundled subtree totals. All six totals share a
single OnceLock, so the first call walks the subtree once and fills
every field; subsequent calls return cached values. Children’s bundles
are computed recursively, so depth-many calls happen once per subtree
regardless of which field is queried first.
pub fn total_allocations(&self) -> u64
pub fn total_deallocations(&self) -> u64
pub fn total_persistent_allocations(&self) -> u64
pub fn total_allocation_count(&self) -> u64
pub fn total_span_count(&self) -> u64
pub fn corrected_self_time(&self) -> Timestamp
pub fn corrected_total_time(&self) -> Timestamp
pub fn max_depth(&self) -> u32
pub fn graph(&self) -> impl Iterator<Item = SpanGraphEventRef<'a>> + '_
pub fn bottom_up(self) -> impl Iterator<Item = SpanBottomUpRef<'a>>
pub fn search(&self, query: &str) -> impl Iterator<Item = SpanRef<'a>>
fn search_index(&self) -> &HashMap<RcStr, Vec<NonZeroUsize>>
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for SpanRef<'a>
impl<'a> !UnwindSafe for SpanRef<'a>
impl<'a> Freeze for SpanRef<'a>
impl<'a> Send for SpanRef<'a>
impl<'a> Sync for SpanRef<'a>
impl<'a> Unpin for SpanRef<'a>
impl<'a> UnsafeUnpin for SpanRef<'a>
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.