Trait garcon::Waiter [−][src]
pub trait Waiter: WaiterClone + Send + Sync { fn wait(&mut self) -> Result<(), WaiterError>; fn restart(&mut self) -> Result<(), WaiterError> { ... } fn start(&mut self) { ... } }
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
fn wait(&mut self) -> Result<(), WaiterError>
[src]
Called at each cycle of the waiting cycle. Call after starting the waiter otherwise returns an error.
Provided methods
fn restart(&mut self) -> Result<(), WaiterError>
[src]
Restart the wait timer. Call after starting the waiter otherwise returns an error.
fn start(&mut self)
[src]
Called when we start the waiting cycle.
Implementations on Foreign Types
impl Waiter for Box<dyn Waiter>
[src]
A Box of Waiter is also a Waiter
fn restart(&mut self) -> Result<(), WaiterError>
[src]
fn start(&mut self)
[src]
Called when we start the waiting cycle.
fn wait(&mut self) -> Result<(), WaiterError>
[src]
Called at each cycle of the waiting cycle. Call after starting the waiter otherwise returns an error.