Struct tracing_subscriber::CurrentSpan [−][src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,