Skip to main content

SyncRetryExecWithStats

Struct SyncRetryExecWithStats 

Source
pub struct SyncRetryExecWithStats<Policy, BA, AA, OX, F, SleepFn, T, E> { /* private fields */ }
Expand description

Sync retry execution wrapper that returns statistics.

Created by calling .with_stats() on a SyncRetryExec.

Implementations§

Source§

impl<Policy, BA, AA, OX, F, SleepFn, T, E> SyncRetryExecWithStats<Policy, BA, AA, OX, F, SleepFn, T, E>

Source

pub fn call(self) -> (Result<T, RetryError<T, E>>, RetryStats)
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: RetryOp<T, E>, SleepFn: SyncSleep,

Executes the retry loop and returns both the result and collected stats.

§Panics

Panics if stats collection fails internally (should not happen in practice).

Trait Implementations§

Source§

impl<Policy, BA, AA, OX, F, SleepFn, T, E> Debug for SyncRetryExecWithStats<Policy, BA, AA, OX, F, SleepFn, T, E>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Policy, BA, AA, OX, F, SleepFn, T, E> !RefUnwindSafe for SyncRetryExecWithStats<Policy, BA, AA, OX, F, SleepFn, T, E>

§

impl<Policy, BA, AA, OX, F, SleepFn, T, E> !Send for SyncRetryExecWithStats<Policy, BA, AA, OX, F, SleepFn, T, E>

§

impl<Policy, BA, AA, OX, F, SleepFn, T, E> !Sync for SyncRetryExecWithStats<Policy, BA, AA, OX, F, SleepFn, T, E>

§

impl<Policy, BA, AA, OX, F, SleepFn, T, E> !UnwindSafe for SyncRetryExecWithStats<Policy, BA, AA, OX, F, SleepFn, T, E>

§

impl<Policy, BA, AA, OX, F, SleepFn, T, E> Freeze for SyncRetryExecWithStats<Policy, BA, AA, OX, F, SleepFn, T, E>
where Policy: Freeze, F: Freeze, SleepFn: Freeze, BA: Freeze, AA: Freeze, OX: Freeze,

§

impl<Policy, BA, AA, OX, F, SleepFn, T, E> Unpin for SyncRetryExecWithStats<Policy, BA, AA, OX, F, SleepFn, T, E>
where Policy: Unpin, F: Unpin, SleepFn: Unpin, BA: Unpin, AA: Unpin, OX: Unpin,

§

impl<Policy, BA, AA, OX, F, SleepFn, T, E> UnsafeUnpin for SyncRetryExecWithStats<Policy, BA, AA, OX, F, SleepFn, T, E>
where Policy: UnsafeUnpin, F: UnsafeUnpin, SleepFn: UnsafeUnpin, BA: UnsafeUnpin, AA: UnsafeUnpin, OX: 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.