Trait Intervalable

Source
pub trait Intervalable {
    // Required methods
    fn interval(dur: Duration) -> Self;
    fn wait<'a>(&'a mut self) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>>;
    fn wait_for_std<'a>(
        &'a mut self,
    ) -> Pin<Box<dyn Future<Output = Option<Instant>> + Send + 'a>>;
}

Required Methods§

Source

fn interval(dur: Duration) -> Self

Source

fn wait<'a>(&'a mut self) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>>

Source

fn wait_for_std<'a>( &'a mut self, ) -> Pin<Box<dyn Future<Output = Option<Instant>> + Send + 'a>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§