Skip to main content

EnterSpan

Trait EnterSpan 

Source
pub trait EnterSpan {
    type Output;

    // Required method
    fn enter(self) -> Self::Output;
}
Expand description

Trait to convert WithSpan<T> containers into WithEntered<T> containers, by tracing::Span::entering the span.

The associated type EnterSpan::Output allows for conversions that change the outer type which may wrap WithSpan<T>, such as Option or Poll. For example, one implementation for poll could allow to convert from Poll<WithSpan<T>> to Poll<WithEntered<T>>.

Required Associated Types§

Required Methods§

Source

fn enter(self) -> Self::Output

Implementations on Foreign Types§

Source§

impl<T: EnterSpan> EnterSpan for Option<T>

Source§

type Output = Option<<T as EnterSpan>::Output>

Source§

fn enter(self) -> Self::Output

Source§

impl<T: EnterSpan> EnterSpan for Poll<T>

Source§

type Output = Poll<<T as EnterSpan>::Output>

Source§

fn enter(self) -> Self::Output

Source§

impl<T: EnterSpan, E> EnterSpan for Result<T, E>

Source§

type Output = Result<<T as EnterSpan>::Output, E>

Source§

fn enter(self) -> Self::Output

Implementors§