Skip to main content

AsyncRetryExecWithStats

Struct AsyncRetryExecWithStats 

Source
pub struct AsyncRetryExecWithStats<Policy, BA, AA, OX, F, Fut, SleepImpl, T, E, SleepFut = ()> { /* private fields */ }
Expand description

Async retry execution wrapper that also yields RetryStats.

Created by calling .with_stats() on an AsyncRetryExec.

Implementations§

Source§

impl<Policy, BA, AA, OX, F, Fut, SleepImpl, T, E, SleepFut> AsyncRetryExecWithStats<Policy, BA, AA, OX, F, Fut, SleepImpl, T, E, SleepFut>
where Policy: PolicyHandle, Policy::Stop: Stop, Policy::Wait: Wait, Policy::Predicate: Predicate<T, E>, BA: BeforeAttemptHook, AA: AttemptHook<T, E>, OX: ExitHook<T, E>, F: AsyncRetryOp<T, E, Fut>, Fut: Future<Output = Result<T, E>>, SleepImpl: Sleeper<Sleep = SleepFut>, SleepFut: Future<Output = ()>,

Source

pub fn call( self, ) -> impl Future<Output = (Result<T, RetryError<T, E>>, RetryStats)>

Runs the configured retry loop, returning a future that resolves to the result paired with RetryStats.

Trait Implementations§

Source§

impl<Policy, BA, AA, OX, F, Fut, SleepImpl, T, E, SleepFut> Debug for AsyncRetryExecWithStats<Policy, BA, AA, OX, F, Fut, SleepImpl, T, E, SleepFut>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'__pin, Policy, BA, AA, OX, F, Fut, SleepImpl, T, E, SleepFut> Unpin for AsyncRetryExecWithStats<Policy, BA, AA, OX, F, Fut, SleepImpl, T, E, SleepFut>
where PinnedFieldsOf<__Origin<'__pin, Policy, BA, AA, OX, F, Fut, SleepImpl, T, E, SleepFut>>: Unpin,

Auto Trait Implementations§

§

impl<Policy, BA, AA, OX, F, Fut, SleepImpl, T, E, SleepFut = ()> !RefUnwindSafe for AsyncRetryExecWithStats<Policy, BA, AA, OX, F, Fut, SleepImpl, T, E, SleepFut>

§

impl<Policy, BA, AA, OX, F, Fut, SleepImpl, T, E, SleepFut = ()> !Send for AsyncRetryExecWithStats<Policy, BA, AA, OX, F, Fut, SleepImpl, T, E, SleepFut>

§

impl<Policy, BA, AA, OX, F, Fut, SleepImpl, T, E, SleepFut = ()> !Sync for AsyncRetryExecWithStats<Policy, BA, AA, OX, F, Fut, SleepImpl, T, E, SleepFut>

§

impl<Policy, BA, AA, OX, F, Fut, SleepImpl, T, E, SleepFut = ()> !UnwindSafe for AsyncRetryExecWithStats<Policy, BA, AA, OX, F, Fut, SleepImpl, T, E, SleepFut>

§

impl<Policy, BA, AA, OX, F, Fut, SleepImpl, T, E, SleepFut> Freeze for AsyncRetryExecWithStats<Policy, BA, AA, OX, F, Fut, SleepImpl, T, E, SleepFut>
where Policy: Freeze, F: Freeze, SleepImpl: Freeze, BA: Freeze, AA: Freeze, OX: Freeze, Fut: Freeze, SleepFut: Freeze, T: Freeze, E: Freeze,

§

impl<Policy, BA, AA, OX, F, Fut, SleepImpl, T, E, SleepFut> UnsafeUnpin for AsyncRetryExecWithStats<Policy, BA, AA, OX, F, Fut, SleepImpl, T, E, SleepFut>
where Policy: UnsafeUnpin, F: UnsafeUnpin, SleepImpl: UnsafeUnpin, BA: UnsafeUnpin, AA: UnsafeUnpin, OX: UnsafeUnpin, Fut: UnsafeUnpin, SleepFut: UnsafeUnpin, T: UnsafeUnpin, E: UnsafeUnpin,

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.