Skip to main content

SyncRetryBuilderWithStats

Struct SyncRetryBuilderWithStats 

Source
pub struct SyncRetryBuilderWithStats<S, W, P, BA, AA, OX, F, SleepFn, T, E> { /* private fields */ }
Expand description

Owned sync retry builder wrapper that returns statistics.

§Examples

use core::time::Duration;
use relentless::RetryExt;

let retry = (|| Ok::<u32, &str>(1))
    .retry()
    .sleep(|_dur: Duration| {})
    .with_stats();

let _ = retry;

Implementations§

Source§

impl<S, W, P, BA, AA, OX, F, SleepFn, T, E> SyncRetryBuilderWithStats<S, W, P, BA, AA, OX, F, SleepFn, T, E>
where S: Stop, W: Wait, P: Predicate<T, E>, BA: BeforeAttemptHook, AA: AttemptHook<T, E>, OX: ExitHook<T, E>, F: RetryOp<T, E>, SleepFn: SyncSleep,

Source

pub fn call(self) -> (Result<T, RetryError<T, E>>, RetryStats)

Trait Implementations§

Source§

impl<S, W, P, BA, AA, OX, F, SleepFn, T, E> Debug for SyncRetryBuilderWithStats<S, W, P, 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<S, W, P, BA, AA, OX, F, SleepFn, T, E> Freeze for SyncRetryBuilderWithStats<S, W, P, BA, AA, OX, F, SleepFn, T, E>
where F: Freeze, SleepFn: Freeze, S: Freeze, W: Freeze, P: Freeze, BA: Freeze, AA: Freeze, OX: Freeze,

§

impl<S, W, P, BA, AA, OX, F, SleepFn, T, E> !RefUnwindSafe for SyncRetryBuilderWithStats<S, W, P, BA, AA, OX, F, SleepFn, T, E>

§

impl<S, W, P, BA, AA, OX, F, SleepFn, T, E> !Send for SyncRetryBuilderWithStats<S, W, P, BA, AA, OX, F, SleepFn, T, E>

§

impl<S, W, P, BA, AA, OX, F, SleepFn, T, E> !Sync for SyncRetryBuilderWithStats<S, W, P, BA, AA, OX, F, SleepFn, T, E>

§

impl<S, W, P, BA, AA, OX, F, SleepFn, T, E> Unpin for SyncRetryBuilderWithStats<S, W, P, BA, AA, OX, F, SleepFn, T, E>
where F: Unpin, SleepFn: Unpin, S: Unpin, W: Unpin, P: Unpin, BA: Unpin, AA: Unpin, OX: Unpin,

§

impl<S, W, P, BA, AA, OX, F, SleepFn, T, E> UnsafeUnpin for SyncRetryBuilderWithStats<S, W, P, BA, AA, OX, F, SleepFn, T, E>

§

impl<S, W, P, BA, AA, OX, F, SleepFn, T, E> !UnwindSafe for SyncRetryBuilderWithStats<S, W, P, BA, AA, OX, F, SleepFn, T, E>

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.