SleepRunUntil

Trait SleepRunUntil 

Source
pub trait SleepRunUntil {
    type Output<T>;

    // Required methods
    fn success<T>(self, ret: T) -> Self::Output<T>;
    fn error<T>(self) -> Self::Output<T>;
    fn poll_error(&mut self) -> bool;
}
Expand description

Zero cost abstraction to check if we should exit a running SleepStrategy.

Required Associated Types§

Source

type Output<T>

The output type to return.

Required Methods§

Source

fn success<T>(self, ret: T) -> Self::Output<T>

Exit with success, returning a value.

Consumes the SleepRunUntil instance.

Source

fn error<T>(self) -> Self::Output<T>

Exit with an error.

Consumes the SleepRunUntil instance.

Source

fn poll_error(&mut self) -> bool

Check if an error has occurred, prompting an early exit.

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§