pub struct TimingOutput<T> { /* private fields */ }Expand description
A wrapper around timing information for an instrumented future and that future’s output.
See the documentation on Timing for further details.
Implementations§
Source§impl<T> TimingOutput<T>
impl<T> TimingOutput<T>
Sourcepub fn timing(&self) -> Timing
pub fn timing(&self) -> Timing
Returns the timing of the future that was instrumented.
§Examples
let output = future_timing::timed(some_async_fn()).await;
let timing: future_timing::Timing = output.timing();Sourcepub fn into_parts(self) -> (Timing, T)
pub fn into_parts(self) -> (Timing, T)
Returns the timing of the future and its output.
§Examples
let output = future_timing::timed(some_async_fn()).await;
let (timing, future_output) = output.into_parts();Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Returns the future’s output.
§Examples
let output = future_timing::timed(some_async_fn()).await;
let future_output = output.into_inner();Trait Implementations§
Source§impl<T: Clone> Clone for TimingOutput<T>
impl<T: Clone> Clone for TimingOutput<T>
Source§fn clone(&self) -> TimingOutput<T>
fn clone(&self) -> TimingOutput<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for TimingOutput<T>
impl<T: Debug> Debug for TimingOutput<T>
Source§impl<T: Hash> Hash for TimingOutput<T>
impl<T: Hash> Hash for TimingOutput<T>
Source§impl<T: PartialEq> PartialEq for TimingOutput<T>
impl<T: PartialEq> PartialEq for TimingOutput<T>
impl<T: Copy> Copy for TimingOutput<T>
impl<T> StructuralPartialEq for TimingOutput<T>
Auto Trait Implementations§
impl<T> Freeze for TimingOutput<T>where
T: Freeze,
impl<T> RefUnwindSafe for TimingOutput<T>where
T: RefUnwindSafe,
impl<T> Send for TimingOutput<T>where
T: Send,
impl<T> Sync for TimingOutput<T>where
T: Sync,
impl<T> Unpin for TimingOutput<T>where
T: Unpin,
impl<T> UnwindSafe for TimingOutput<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more