[][src]Struct actix_rt::time::Delay

#[must_use = "futures do nothing unless you `.await` or poll them"]pub struct Delay { /* fields omitted */ }

Future returned by delay_until and delay_for.

Methods

impl Delay[src]

pub fn deadline(&self) -> Instant[src]

Returns the instant at which the future will complete.

pub fn is_elapsed(&self) -> bool[src]

Returns true if the Delay has elapsed

A Delay is elapsed when the requested duration has elapsed.

pub fn reset(&mut self, deadline: Instant)[src]

Resets the Delay instance to a new deadline.

Calling this function allows changing the instant at which the Delay future completes without having to create new associated state.

This function can be called both before and after the future has completed.

Trait Implementations

impl Debug for Delay[src]

impl Future for Delay[src]

type Output = ()

The type of value produced on completion.

Auto Trait Implementations

impl !RefUnwindSafe for Delay

impl Send for Delay

impl Sync for Delay

impl Unpin for Delay

impl !UnwindSafe for Delay

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> FutureExt for T where
    T: Future + ?Sized
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.