pub struct RetryableTransaction<'a> { /* private fields */ }Implementations§
source§impl RetryableTransaction<'_>
impl RetryableTransaction<'_>
sourcepub fn retry_exponential(self, base_millis: u64, max_retries: usize) -> Self
pub fn retry_exponential(self, base_millis: u64, max_retries: usize) -> Self
Retry this transactions if it fails. This will retry the transaction with exponential backoff.
sourcepub fn retry(
self,
strategy: impl Iterator<Item = Duration> + Send + Sync + 'static,
) -> Self
pub fn retry( self, strategy: impl Iterator<Item = Duration> + Send + Sync + 'static, ) -> Self
Retry this transactions if it fails. This will retry the transaction with the provided retry strategy.
sourcepub fn wait_until(self, wait_until: TxExecutionStatus) -> Self
pub fn wait_until(self, wait_until: TxExecutionStatus) -> Self
Specifies the status to wait until the transaction reaches in the network. The default
value is TxExecutionStatus::ExecutedOptimistic if not specified by this function.
Trait Implementations§
source§impl<'a> IntoFuture for RetryableTransaction<'a>
impl<'a> IntoFuture for RetryableTransaction<'a>
source§type Output = Result<FinalExecutionOutcomeView, Error>
type Output = Result<FinalExecutionOutcomeView, Error>
The output that the future will produce on completion.
source§type IntoFuture = Pin<Box<dyn Future<Output = <RetryableTransaction<'a> as IntoFuture>::Output> + Send + 'a>>
type IntoFuture = Pin<Box<dyn Future<Output = <RetryableTransaction<'a> as IntoFuture>::Output> + Send + 'a>>
Which kind of future are we turning this into?
source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<'a> Freeze for RetryableTransaction<'a>
impl<'a> !RefUnwindSafe for RetryableTransaction<'a>
impl<'a> Send for RetryableTransaction<'a>
impl<'a> Sync for RetryableTransaction<'a>
impl<'a> Unpin for RetryableTransaction<'a>
impl<'a> !UnwindSafe for RetryableTransaction<'a>
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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