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) { ... } }
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
fn wait(&mut self) -> Result<(), WaiterError>
[src]
Expand description
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]
Expand description
Restart the wait timer. Call after starting the waiter otherwise returns an error.
fn start(&mut self)
[src]
Expand description
Called when we start the waiting cycle.
Implementations on Foreign Types
Implementors
impl Waiter for DelayComposer
[src]
impl Waiter for DelayComposer
[src]impl Waiter for ExponentialBackoffWaiter
[src]
impl Waiter for ExponentialBackoffWaiter
[src]impl Waiter for ThrottleWaiter
[src]
impl Waiter for ThrottleWaiter
[src]fn wait(&mut self) -> Result<(), WaiterError>
[src]
impl Waiter for TimeoutWaiter
[src]
impl Waiter for TimeoutWaiter
[src]