Trait trust_dns_proto::Time[][src]

pub trait Time {
#[must_use]    fn delay_for<'async_trait>(
        duration: Duration
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>;
#[must_use] fn timeout<'async_trait, F: 'static + Future + Send>(
        duration: Duration,
        future: F
    ) -> Pin<Box<dyn Future<Output = Result<F::Output, Error>> + Send + 'async_trait>>
    where
        F: 'async_trait
; }

Generic Time for Delay and Timeout.

Required methods

#[must_use]fn delay_for<'async_trait>(
    duration: Duration
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
[src]

Return a type that implements Future that will wait until the specified duration has elapsed.

#[must_use]fn timeout<'async_trait, F: 'static + Future + Send>(
    duration: Duration,
    future: F
) -> Pin<Box<dyn Future<Output = Result<F::Output, Error>> + Send + 'async_trait>> where
    F: 'async_trait, 
[src]

Return a type that implement Future to complete before the specified duration has elapsed.

Loading content...

Implementors

impl Time for TokioTime[src]

Loading content...