pub struct ActivityRetryPolicy {
pub max_attempts: Option<u32>,
pub backoff: Option<ActivityBackoff>,
pub non_retryable_error_types: Vec<String>,
}Expand description
Durable server-side retry policy for one activity execution.
Fields§
§max_attempts: Option<u32>§backoff: Option<ActivityBackoff>§non_retryable_error_types: Vec<String>Implementations§
Source§impl ActivityRetryPolicy
impl ActivityRetryPolicy
Sourcepub fn new(max_attempts: u32) -> Self
pub fn new(max_attempts: u32) -> Self
Start a policy with a finite attempt budget, including the first attempt.
pub fn backoff_intervals( self, intervals: impl IntoIterator<Item = Duration>, ) -> Self
pub fn exponential_backoff( self, initial_interval: Duration, coefficient: u32, maximum_interval: Option<Duration>, ) -> Self
pub fn non_retryable_error_type(self, error_type: impl Into<String>) -> Self
pub fn non_retryable_error_types( self, error_types: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Trait Implementations§
Source§impl Clone for ActivityRetryPolicy
impl Clone for ActivityRetryPolicy
Source§fn clone(&self) -> ActivityRetryPolicy
fn clone(&self) -> ActivityRetryPolicy
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 Debug for ActivityRetryPolicy
impl Debug for ActivityRetryPolicy
Source§impl Default for ActivityRetryPolicy
impl Default for ActivityRetryPolicy
Source§fn default() -> ActivityRetryPolicy
fn default() -> ActivityRetryPolicy
Returns the “default value” for a type. Read more
impl Eq for ActivityRetryPolicy
Source§impl PartialEq for ActivityRetryPolicy
impl PartialEq for ActivityRetryPolicy
impl StructuralPartialEq for ActivityRetryPolicy
Auto Trait Implementations§
impl Freeze for ActivityRetryPolicy
impl RefUnwindSafe for ActivityRetryPolicy
impl Send for ActivityRetryPolicy
impl Sync for ActivityRetryPolicy
impl Unpin for ActivityRetryPolicy
impl UnsafeUnpin for ActivityRetryPolicy
impl UnwindSafe for ActivityRetryPolicy
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