#[non_exhaustive]pub struct RetryPolicy { /* private fields */ }Expand description
Options for retrying workflows and activities.
Durations longer than 10,000 years are clamped to the maximum valid protobuf duration.
Implementations§
Source§impl RetryPolicy
impl RetryPolicy
Sourcepub fn initial_interval(&self) -> Duration
pub fn initial_interval(&self) -> Duration
Backoff interval for the first retry.
Sourcepub fn set_initial_interval(
&mut self,
initial_interval: Duration,
) -> &mut RetryPolicy
pub fn set_initial_interval( &mut self, initial_interval: Duration, ) -> &mut RetryPolicy
Set the backoff interval for the first retry.
Sourcepub fn backoff_coefficient(&self) -> f64
pub fn backoff_coefficient(&self) -> f64
Coefficient used to calculate the next retry interval.
Sourcepub fn set_backoff_coefficient(
&mut self,
backoff_coefficient: f64,
) -> &mut RetryPolicy
pub fn set_backoff_coefficient( &mut self, backoff_coefficient: f64, ) -> &mut RetryPolicy
Set the coefficient used to calculate the next retry interval.
Sourcepub fn maximum_interval(&self) -> Option<Duration>
pub fn maximum_interval(&self) -> Option<Duration>
Maximum backoff interval between retries.
Sourcepub fn set_maximum_interval(
&mut self,
maximum_interval: Option<Duration>,
) -> &mut RetryPolicy
pub fn set_maximum_interval( &mut self, maximum_interval: Option<Duration>, ) -> &mut RetryPolicy
Set the maximum backoff interval between retries.
Sourcepub fn maximum_attempts(&self) -> u32
pub fn maximum_attempts(&self) -> u32
Maximum number of attempts. Zero means unlimited attempts.
Sourcepub fn set_maximum_attempts(
&mut self,
maximum_attempts: u32,
) -> &mut RetryPolicy
pub fn set_maximum_attempts( &mut self, maximum_attempts: u32, ) -> &mut RetryPolicy
Sourcepub fn non_retryable_error_types(&self) -> &[String]
pub fn non_retryable_error_types(&self) -> &[String]
Error type names that should not be retried.
Sourcepub fn set_non_retryable_error_types(
&mut self,
values: impl IntoIterator<Item = impl Into<String>>,
) -> &mut RetryPolicy
pub fn set_non_retryable_error_types( &mut self, values: impl IntoIterator<Item = impl Into<String>>, ) -> &mut RetryPolicy
Set the error type names that should not be retried.
Sourcepub fn raw(&self) -> &RetryPolicy
pub fn raw(&self) -> &RetryPolicy
Access the underlying retry policy protobuf.
Sourcepub fn into_raw(self) -> RetryPolicy
pub fn into_raw(self) -> RetryPolicy
Consume this wrapper and return the underlying retry policy protobuf.
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 (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 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
Source§impl From<RetryPolicy> for RetryPolicy
impl From<RetryPolicy> for RetryPolicy
Source§fn from(value: RetryPolicy) -> RetryPolicy
fn from(value: RetryPolicy) -> RetryPolicy
Converts to this type from the input type.
Source§impl PartialEq for RetryPolicy
impl PartialEq for RetryPolicy
impl StructuralPartialEq for RetryPolicy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request