TimeoutNs

Trait TimeoutNs 

Source
pub trait TimeoutNs {
    type TimeoutState: TimeoutState;

    // Required methods
    fn start_ns(&self, timeout: u32) -> Self::TimeoutState;
    fn start_us(&self, timeout: u32) -> Self::TimeoutState;
    fn start_ms(&self, timeout: u32) -> Self::TimeoutState;

    // Provided methods
    fn ns_with(&self, timeout: u32, f: impl FnMut() -> bool) -> bool { ... }
    fn us_with(&self, timeout: u32, f: impl FnMut() -> bool) -> bool { ... }
    fn ms_with(&self, timeout: u32, f: impl FnMut() -> bool) -> bool { ... }
}

Required Associated Types§

Required Methods§

Source

fn start_ns(&self, timeout: u32) -> Self::TimeoutState

Source

fn start_us(&self, timeout: u32) -> Self::TimeoutState

Source

fn start_ms(&self, timeout: u32) -> Self::TimeoutState

Provided Methods§

Source

fn ns_with(&self, timeout: u32, f: impl FnMut() -> bool) -> bool

Source

fn us_with(&self, timeout: u32, f: impl FnMut() -> bool) -> bool

Source

fn ms_with(&self, timeout: u32, f: impl FnMut() -> bool) -> bool

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§