[][src]Struct futures_delay_queue::DelayHandle

pub struct DelayHandle { /* fields omitted */ }

A handle to cancel the corresponding delay of an item in DelayQueue.

Methods

impl DelayHandle[src]

pub async fn reset_at(self, when: Instant) -> Result<Self, ErrorAlreadyExpired>[src]

Resets the delay of the corresponding item to when and returns a new DelayHandle on success.

pub async fn reset(self, dur: Duration) -> Result<Self, ErrorAlreadyExpired>[src]

Resets the delay of the corresponding item to now + dur and returns a new DelayHandleon success.

pub async fn cancel(self) -> Result<(), ErrorAlreadyExpired>[src]

Cancels the delay.

Trait Implementations

impl Debug for DelayHandle[src]

Auto Trait Implementations

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, 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.