pub struct Span { /* private fields */ }
Expand description
An internal node in the log tree carrying information about a Tracing span.
Implementations§
Source§impl Span
impl Span
Sourcepub fn total_duration(&self) -> Duration
pub fn total_duration(&self) -> Duration
Returns the total duration the span was entered for.
If the span was used to instrument a Future
, this only accounts for the
time spent polling the Future
. For example, time spent sleeping will
not be accounted for.
Sourcepub fn inner_duration(&self) -> Duration
pub fn inner_duration(&self) -> Duration
Returns the duration that inner spans were opened for.
Sourcepub fn base_duration(&self) -> Duration
pub fn base_duration(&self) -> Duration
Returns the duration this span was entered, but not in any child spans.
Trait 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 UnwindSafe for Span
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