pub struct RetryPolicy { /* private fields */ }Expand description
reqx retry policy for DingTalk clients.
Implementations§
Source§impl RetryPolicy
impl RetryPolicy
pub fn disabled() -> RetryPolicy
pub fn standard() -> RetryPolicy
pub fn max_attempts(self, max_attempts: usize) -> RetryPolicy
pub fn base_backoff(self, base_backoff: Duration) -> RetryPolicy
pub fn max_backoff(self, max_backoff: Duration) -> RetryPolicy
pub fn jitter_ratio(self, jitter_ratio: f64) -> RetryPolicy
pub fn retryable_status_codes( self, codes: impl IntoIterator<Item = u16>, ) -> RetryPolicy
pub fn retryable_transport_error_kinds( self, kinds: impl IntoIterator<Item = TransportErrorKind>, ) -> RetryPolicy
pub fn retryable_timeout_phases( self, phases: impl IntoIterator<Item = TimeoutPhase>, ) -> RetryPolicy
pub fn retry_on_response_body_read_error(self, retry: bool) -> RetryPolicy
pub fn status_retry_window( self, status: u16, max_attempts: usize, ) -> RetryPolicy
pub fn transport_retry_window( self, kind: TransportErrorKind, max_attempts: usize, ) -> RetryPolicy
pub fn timeout_retry_window( self, phase: TimeoutPhase, max_attempts: usize, ) -> RetryPolicy
pub fn response_body_read_retry_window(self, max_attempts: usize) -> RetryPolicy
pub fn retry_classifier( self, retry_classifier: Arc<dyn RetryClassifier>, ) -> RetryPolicy
Trait Implementations§
Source§impl Clone for RetryPolicy
impl Clone for RetryPolicy
Source§fn clone(&self) -> RetryPolicy
fn clone(&self) -> RetryPolicy
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 RetryPolicy
impl Debug for RetryPolicy
Source§impl Default for RetryPolicy
impl Default for RetryPolicy
Source§fn default() -> RetryPolicy
fn default() -> RetryPolicy
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RetryPolicy
impl !RefUnwindSafe for RetryPolicy
impl Send for RetryPolicy
impl Sync for RetryPolicy
impl Unpin for RetryPolicy
impl UnsafeUnpin for RetryPolicy
impl !UnwindSafe for RetryPolicy
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