pub struct Span { /* private fields */ }Expand description
The owner of one running span. Finish it after its instrumented calls
return; dropping it unfinished, including during unwinding, records
Abandoned.
Implementations§
Source§impl Span
impl Span
Sourcepub fn child(&self, task: impl Into<String>, kind: SpanKind) -> Span
pub fn child(&self, task: impl Into<String>, kind: SpanKind) -> Span
Start a nested span, such as a callback, queue wait, or host suspension.
Sourcepub fn instrument<T>(&self, value: T) -> Instrumented<T>
pub fn instrument<T>(&self, value: T) -> Instrumented<T>
Wrap a stop policy or progress sink so that its calls are recorded in this span, at their original call sites.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Span
impl !UnwindSafe for Span
impl Freeze for Span
impl Send for Span
impl Sync for Span
impl Unpin for Span
impl UnsafeUnpin 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