Skip to main content

RetryConfigValues

Struct RetryConfigValues 

Source
pub struct RetryConfigValues {
Show 17 fields pub max_attempts: Option<u32>, pub max_operation_elapsed_millis: Option<u64>, pub max_operation_elapsed_unlimited: Option<bool>, pub max_total_elapsed_millis: Option<u64>, pub max_total_elapsed_unlimited: Option<bool>, pub attempt_timeout_millis: Option<u64>, pub attempt_timeout_policy: Option<String>, pub worker_cancel_grace_millis: Option<u64>, pub delay: Option<String>, pub delay_strategy: Option<String>, pub fixed_delay_millis: Option<u64>, pub random_min_delay_millis: Option<u64>, pub random_max_delay_millis: Option<u64>, pub exponential_initial_delay_millis: Option<u64>, pub exponential_max_delay_millis: Option<u64>, pub exponential_multiplier: Option<f64>, pub jitter_factor: Option<f64>,
}
Expand description

Raw retry configuration values read from qubit-config.

This struct deliberately keeps all ConfigReader calls in one place. The conversion from qubit-config errors to retry-specific errors happens at the caller boundary, while the remaining methods only translate already typed values into retry domain objects.

Fields are public so callers and integration tests can build snapshots programmatically and merge them with RetryConfigValues::to_options.

Fields§

§max_attempts: Option<u32>

Optional maximum attempts value.

§max_operation_elapsed_millis: Option<u64>

Optional cumulative user operation elapsed-time budget in milliseconds.

§max_operation_elapsed_unlimited: Option<bool>

Optional explicit switch for unlimited user operation elapsed-time budget.

§max_total_elapsed_millis: Option<u64>

Optional total retry-flow elapsed-time budget in milliseconds.

§max_total_elapsed_unlimited: Option<bool>

Optional explicit switch for unlimited total retry-flow elapsed-time budget.

§attempt_timeout_millis: Option<u64>

Optional attempt timeout in milliseconds.

§attempt_timeout_policy: Option<String>

Optional action selected when one attempt times out.

§worker_cancel_grace_millis: Option<u64>

Optional worker cancellation grace period in milliseconds.

§delay: Option<String>

Optional primary delay strategy name.

§delay_strategy: Option<String>

Optional backward-compatible delay strategy alias.

§fixed_delay_millis: Option<u64>

Optional fixed delay in milliseconds.

§random_min_delay_millis: Option<u64>

Optional random delay lower bound in milliseconds.

§random_max_delay_millis: Option<u64>

Optional random delay upper bound in milliseconds.

§exponential_initial_delay_millis: Option<u64>

Optional exponential initial delay in milliseconds.

§exponential_max_delay_millis: Option<u64>

Optional exponential maximum delay in milliseconds.

§exponential_multiplier: Option<f64>

Optional exponential multiplier.

§jitter_factor: Option<f64>

Optional jitter factor.

Implementations§

Source§

impl RetryConfigValues

Source

pub fn to_options( &self, default: &RetryOptions, ) -> Result<RetryOptions, RetryConfigError>

Converts the raw configuration snapshot into validated retry options.

§Parameters
  • default: Default options used when a config key is absent.
§Returns

A validated RetryOptions value.

§Errors

Returns RetryConfigError when the delay strategy name is unsupported or the resulting options fail validation.

Trait Implementations§

Source§

impl Clone for RetryConfigValues

Source§

fn clone(&self) -> RetryConfigValues

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RetryConfigValues

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for RetryConfigValues

Source§

fn eq(&self, other: &RetryConfigValues) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for RetryConfigValues

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, D> IntoConfigDefault<T> for D
where D: IntoValueDefault<T>,

Source§

fn into_config_default(self) -> T

Converts this fallback value into T.
Source§

impl<T> IntoResult<T> for T

Source§

impl<T> IntoValueDefault<T> for T

Source§

fn into_value_default(self) -> T

Converts this argument into the default value.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.