Skip to main content

Delayed

Trait Delayed 

Source
pub trait Delayed {
    // Required method
    fn delayed_until(&self) -> Instant;
}
Expand description

A value that is delayed until some Instant.

The DelayQueue only accepts values that implement this trait. In most situations you do not need to implement this trait yourself. You can use the helper struct Delay.

Required Methods§

Source

fn delayed_until(&self) -> Instant

Returns the Instant until which this value is delayed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> Delayed for Delay<T>