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§
Required Methods§
Sourcefn success<T>(self, ret: T) -> Self::Output<T>
fn success<T>(self, ret: T) -> Self::Output<T>
Exit with success, returning a value.
Consumes the SleepRunUntil instance.
Sourcefn error<T>(self) -> Self::Output<T>
fn error<T>(self) -> Self::Output<T>
Exit with an error.
Consumes the SleepRunUntil instance.
Sourcefn poll_error(&mut self) -> bool
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.