Trait RetryDelay

Source
pub trait RetryDelay {
    // Required method
    fn wait<'life0, 'async_trait>(
        &'life0 self,
        dur: Duration,
    ) -> Pin<Box<dyn Future<Output = Result<(), FloxideError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Helper trait: run a delay respecting cancellation and timeouts if available.

Required Methods§

Source

fn wait<'life0, 'async_trait>( &'life0 self, dur: Duration, ) -> Pin<Box<dyn Future<Output = Result<(), FloxideError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Wait the given duration, returning an error if cancelled or timed out.

Implementors§