Struct tracing_subscriber::CurrentSpan [−][src]
pub struct CurrentSpan { /* fields omitted */ }Tracks the currently executing span on a per-thread basis.
Implementations
impl CurrentSpan[src]
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 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> Instrument for T[src]
impl<T> Instrument for T[src]