pub struct Span { /* private fields */ }
Expand description
A cheaply cloneable span in the await-tree.
Implementations§
Source§impl Span
impl Span
Sourcepub fn verbose(self) -> Self
pub fn verbose(self) -> Self
Set the verbose attribute of the span.
When a span is marked as verbose, it will be included in the output
only if the verbose
flag in the Config
is set.
Sourcepub fn long_running(self) -> Self
pub fn long_running(self) -> Self
Set the long-running attribute of the span.
When a span is marked as long-running, it will not be marked as “!!!”
in the formatted Tree
if it takes too long to complete. The root
span is always marked as long-running.
Trait Implementations§
Source§impl Ord for Span
impl Ord for Span
Source§impl PartialOrd for Span
impl PartialOrd for Span
impl Eq for Span
impl StructuralPartialEq for Span
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> ToRootSpan for Twhere
T: Display,
impl<T> ToRootSpan for Twhere
T: Display,
Source§fn to_root_span(&self) -> Span
fn to_root_span(&self) -> Span
Convert the type to a
Span
that can be used as the root of an await-tree.