pub enum RetryMethod {
ExponentialBackoff {
initial_sleep: Duration,
factor: u8,
},
Fixed {
sleep: Duration,
},
}Expand description
Specifies the retry strategy for RPC endpoint requests.
Variants§
ExponentialBackoff
Exponential backoff strategy with configurable initial delay and multiplication factor.
The delay is calculated as: initial_sleep * factor^retry_number
Fields
Fixed
Fixed delay strategy with constant sleep duration
Trait Implementations§
Source§impl Clone for RetryMethod
impl Clone for RetryMethod
Source§fn clone(&self) -> RetryMethod
fn clone(&self) -> RetryMethod
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RetryMethod
impl Debug for RetryMethod
Source§impl<'de> Deserialize<'de> for RetryMethod
impl<'de> Deserialize<'de> for RetryMethod
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RetryMethod
impl RefUnwindSafe for RetryMethod
impl Send for RetryMethod
impl Sync for RetryMethod
impl Unpin for RetryMethod
impl UnwindSafe for RetryMethod
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