[][src]Struct tracing_subscriber::CurrentSpan

pub struct CurrentSpan { /* fields omitted */ }

Tracks the currently executing span on a per-thread basis.

Methods

impl CurrentSpan[src]

pub fn new() -> Self[src]

Returns a new CurrentSpan.

pub fn id(&self) -> Option<Id>[src]

Returns the Id of the span in which the current thread is executing, or None if it is not inside of a span.

pub fn enter(&self, span: Id)[src]

Records that the current thread has entered the span with the provided ID.

pub fn exit(&self)[src]

Records that the current thread has exited a span.

Trait Implementations

impl Default for CurrentSpan[src]

impl Debug for CurrentSpan[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T[src]