Struct tracing_subscriber::CurrentSpan[][src]

pub struct CurrentSpan { /* fields omitted */ }

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

Implementations

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 Debug for CurrentSpan[src]

impl Default for CurrentSpan[src]

Auto Trait Implementations

impl RefUnwindSafe for CurrentSpan

impl Send for CurrentSpan

impl Sync for CurrentSpan

impl Unpin for CurrentSpan

impl UnwindSafe for CurrentSpan

Blanket Implementations

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

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

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

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

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<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.