Skip to main content

RetryHandle

Struct RetryHandle 

Source
pub struct RetryHandle<Inj, Dur> { /* private fields */ }
Expand description

Persistent retry handle

Implementations§

Source§

impl<'a, Inj, Dur> RetryHandle<Inj, Dur>
where Inj: RetryInjector<'a>, Dur: IntoIterator<Item = Duration> + Clone,

Source

pub fn new(injector: Inj, durations: Dur) -> Self

Create a new persistent retry handle from an injector and a cloneable delay iterator

Source

pub async fn retry_pending<F>( &mut self, concurrency_limit: usize, operation: &dyn Fn(Inj::Input) -> F, )
where F: Future<Output = Inj::Res>,

Start concurrent persistent retry of pending input loaded from the injector using the given operation and concurrency limit

Source

pub async fn retry_stream<F, S>( &mut self, stream: S, concurrency_limit: usize, operation: &dyn Fn(Inj::Input) -> F, )
where F: Future<Output = Inj::Res>, S: Stream<Item = (Inj::Id, Inj::Input)>,

Start concurrent persistent retry of input loaded from the given stream using the given operation and concurrency limit

Source

pub async fn retry<F>( &mut self, id: Inj::Id, input: Inj::Input, operation: &dyn Fn(Inj::Input) -> F, )
where F: Future<Output = Inj::Res>,

Persistently retry a given input (uniquely identified by the given id) using the given operation

Auto Trait Implementations§

§

impl<Inj, Dur> Freeze for RetryHandle<Inj, Dur>
where Inj: Freeze, Dur: Freeze,

§

impl<Inj, Dur> RefUnwindSafe for RetryHandle<Inj, Dur>
where Inj: RefUnwindSafe, Dur: RefUnwindSafe,

§

impl<Inj, Dur> Send for RetryHandle<Inj, Dur>
where Inj: Send, Dur: Send,

§

impl<Inj, Dur> Sync for RetryHandle<Inj, Dur>
where Inj: Sync, Dur: Sync,

§

impl<Inj, Dur> Unpin for RetryHandle<Inj, Dur>
where Inj: Unpin, Dur: Unpin,

§

impl<Inj, Dur> UnsafeUnpin for RetryHandle<Inj, Dur>
where Inj: UnsafeUnpin, Dur: UnsafeUnpin,

§

impl<Inj, Dur> UnwindSafe for RetryHandle<Inj, Dur>
where Inj: UnwindSafe, Dur: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V