pub struct RetryBuilder<S> { /* private fields */ }Expand description
Builder for Retry
Implementations§
Source§impl<S: Strategy> RetryBuilder<S>
Builder for Retry.
impl<S: Strategy> RetryBuilder<S>
Builder for Retry.
§Example
ⓘ
use xmtp_common::retry::RetryBuilder;
RetryBuilder::default()
.retries(5)
.with_strategy(xmtp_common::ExponentialBackoff::default())
.build();pub fn build(self) -> Retry<S>
pub fn with_strategy<St: Strategy>(self, strategy: St) -> RetryBuilder<St>
Trait Implementations§
Source§impl<S: Clone> Clone for RetryBuilder<S>
impl<S: Clone> Clone for RetryBuilder<S>
Source§fn clone(&self) -> RetryBuilder<S>
fn clone(&self) -> RetryBuilder<S>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<S: Debug> Debug for RetryBuilder<S>
impl<S: Debug> Debug for RetryBuilder<S>
Source§impl<S: Default> Default for RetryBuilder<S>
impl<S: Default> Default for RetryBuilder<S>
Source§fn default() -> RetryBuilder<S>
fn default() -> RetryBuilder<S>
Returns the “default value” for a type. Read more
impl<S: Copy> Copy for RetryBuilder<S>
Auto Trait Implementations§
impl<S> Freeze for RetryBuilder<S>where
S: Freeze,
impl<S> RefUnwindSafe for RetryBuilder<S>where
S: RefUnwindSafe,
impl<S> Send for RetryBuilder<S>where
S: Send,
impl<S> Sync for RetryBuilder<S>where
S: Sync,
impl<S> Unpin for RetryBuilder<S>where
S: Unpin,
impl<S> UnsafeUnpin for RetryBuilder<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for RetryBuilder<S>where
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more