Trait Sleeper

Source
pub trait Sleeper: 'static {
    type Sleep: Future<Output = ()>;

    // Required method
    fn sleep(dur: Duration) -> Self::Sleep;
}

Required Associated Types§

Source

type Sleep: Future<Output = ()>

Required Methods§

Source

fn sleep(dur: Duration) -> Self::Sleep

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§