pub struct TraceTaskFuture<'a, F, I>
where F: Future, I: Instrument,
{ /* private fields */ }

Trait Implementations§

source§

impl<'p, F, P> Future for TraceTaskFuture<'p, F, P>
where F: Future, P: Instrument,

§

type Output = <F as Future>::Output

The type of value produced on completion.
source§

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more
source§

impl<'__pin, 'a, F, I> Unpin for TraceTaskFuture<'a, F, I>
where __Origin<'__pin, 'a, F, I>: Unpin, F: Future, I: Instrument,

Auto Trait Implementations§

§

impl<'a, F, I> RefUnwindSafe for TraceTaskFuture<'a, F, I>

§

impl<'a, F, I> Send for TraceTaskFuture<'a, F, I>
where F: Send, I: Send,

§

impl<'a, F, I> Sync for TraceTaskFuture<'a, F, I>
where F: Sync, I: Sync,

§

impl<'a, F, I> !UnwindSafe for TraceTaskFuture<'a, F, I>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<F> IntoFuture for F
where F: Future,

§

type Output = <F as Future>::Output

The output that the future will produce on completion.
§

type IntoFuture = F

Which kind of future are we turning this into?
source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
source§

impl<F> TraceFuture for F
where F: Future,

source§

fn trace_task<I: Instrument>( self, instrument: &mut I ) -> TraceTaskFuture<'_, Self, I>

Trace a Future’s task execution. The underlying Instrument calls on_enter when the future is first polled, and calls on_exit when it completes (returns Poll::Ready). This is useful for analyzing the total time it takes for your future to complete (note that this is different from the real CPU time the task consumes).
source§

fn trace_poll<I: Instrument>( self, instrument: &mut I ) -> TracePollFuture<'_, Self, I>

Trace a Future poll execution. The underlying Instrument calls on_enter every time prior to the underlying future being polled, and calls and calls on_exit when it completes (returns on_exit right after the poll call completes, regardless of whether the underlying future completed or not. This is useful for analyzing the time it takes to poll your future (ie, actual CPU time used).
source§

fn trace_task_and_poll<'a, I1: Instrument, I2: Instrument>( self, task_instrument: &'a mut I1, poll_instrument: &'a mut I2 ) -> TraceTaskAndPollFuture<'a, Self, I1, I2>

The first underlying Instrument (task_instrument) acts exactly as trace_task, and the second underlying Instrument (poll_instrument) acts exactly as trace_poll.
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.