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

impl Waiter for Box<dyn Waiter>[src]

A Box of Waiter is also a Waiter

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.

fn restart(&mut self) -> Result<(), WaiterError>[src]

Implementors

impl Waiter for Delay[src]

fn restart(&mut self) -> Result<(), WaiterError>[src]

fn start(&mut self)[src]

fn wait(&mut self) -> Result<(), WaiterError>[src]

impl Waiter for DelayComposer[src]

fn restart(&mut self) -> Result<(), WaiterError>[src]

fn start(&mut self)[src]

fn wait(&mut self) -> Result<(), WaiterError>[src]

impl Waiter for ExponentialBackoffWaiter[src]

fn restart(&mut self) -> Result<(), WaiterError>[src]

fn start(&mut self)[src]

fn wait(&mut self) -> Result<(), WaiterError>[src]

impl Waiter for ThrottleWaiter[src]

fn wait(&mut self) -> Result<(), WaiterError>[src]

impl Waiter for TimeoutWaiter[src]

fn restart(&mut self) -> Result<(), WaiterError>[src]

fn start(&mut self)[src]

fn wait(&mut self) -> Result<(), WaiterError>[src]