pub trait Waiter: WaiterClone + Send {
// Required method
fn wait(&self) -> Result<(), WaiterError>;
// Provided methods
fn restart(&mut self) -> Result<(), WaiterError> { ... }
fn start(&mut self) { ... }
}Expand description
A waiter trait, that can be used for executing a delay. Waiters need to be multi-threaded and cloneable. A waiter should not be reused twice.
Required Methods§
Sourcefn wait(&self) -> Result<(), WaiterError>
fn wait(&self) -> Result<(), WaiterError>
Called at each cycle of the waiting cycle. Call after starting the waiter otherwise returns an error.
Provided Methods§
Sourcefn restart(&mut self) -> Result<(), WaiterError>
fn restart(&mut self) -> Result<(), WaiterError>
Restart the wait timer. Call after starting the waiter otherwise returns an error.