pub struct Span {Show 16 fields
pub parent: Option<NonZeroUsize>,
pub depth: u32,
pub start: Timestamp,
pub category: RcStr,
pub name: RcStr,
pub args: SmallVec<[(RcStr, RcStr); 1]>,
pub events: LazySortedVec<SpanEvent>,
pub is_complete: bool,
pub self_allocations: u64,
pub self_allocation_count: u64,
pub self_deallocations: u64,
pub self_deallocation_count: u64,
pub totals: OnceLock<SpanTotals>,
pub time_data: SpanTimeData,
pub extra: OnceLock<Box<SpanExtra>>,
pub names: OnceLock<SpanNames>,
}Fields§
§parent: Option<NonZeroUsize>§depth: u32§start: Timestamp§category: RcStr§name: RcStr§args: SmallVec<[(RcStr, RcStr); 1]>§events: LazySortedVec<SpanEvent>The list of events sorted by start time. Backed by a SmallVec so leaf spans (~69%, typically just one self-time event) don’t pay a heap allocation.
is_complete: bool§self_allocations: u64§self_allocation_count: u64§self_deallocations: u64§self_deallocation_count: u64§totals: OnceLock<SpanTotals>§time_data: SpanTimeData§extra: OnceLock<Box<SpanExtra>>§names: OnceLock<SpanNames>Lazy first-touch via OnceLock, but inline rather than boxed: ~96% of
spans get names populated after browsing, never invalidated, so the box
indirection is pure overhead.
Implementations§
Auto Trait Implementations§
impl !Freeze for Span
impl !RefUnwindSafe for Span
impl Send for Span
impl Sync for Span
impl Unpin for Span
impl UnsafeUnpin for Span
impl UnwindSafe for Span
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
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.