pub struct AttemptRunner<H, T = SystemAttemptTimer> { /* private fields */ }Expand description
Runs single-attempt executions by composing handler, timeout, and retry input derivation.
Implementations§
Source§impl<H> AttemptRunner<H, SystemAttemptTimer>where
H: ExecutorHandler,
impl<H> AttemptRunner<H, SystemAttemptTimer>where
H: ExecutorHandler,
Source§impl<H, T> AttemptRunner<H, T>where
H: ExecutorHandler,
T: AttemptTimer,
impl<H, T> AttemptRunner<H, T>where
H: ExecutorHandler,
T: AttemptTimer,
Sourcepub fn with_timer(handler: H, timer: T) -> Self
pub fn with_timer(handler: H, timer: T) -> Self
Creates an attempt runner with an explicit timer implementation.
Sourcepub fn with_timer_and_metrics(
handler: H,
timer: T,
timeout_metrics: TimeoutCooperationMetrics,
) -> Self
pub fn with_timer_and_metrics( handler: H, timer: T, timeout_metrics: TimeoutCooperationMetrics, ) -> Self
Creates an attempt runner with explicit timer and timeout metric sink.
Sourcepub fn with_timer_metrics_and_cadence_policy(
handler: H,
timer: T,
timeout_metrics: TimeoutCooperationMetrics,
timeout_cadence_policy: TimeoutCadencePolicy,
) -> Self
pub fn with_timer_metrics_and_cadence_policy( handler: H, timer: T, timeout_metrics: TimeoutCooperationMetrics, timeout_cadence_policy: TimeoutCadencePolicy, ) -> Self
Creates an attempt runner with explicit timer, metric sink, and cadence policy.
Sourcepub fn timeout_metrics(&self) -> &TimeoutCooperationMetrics
pub fn timeout_metrics(&self) -> &TimeoutCooperationMetrics
Returns the timeout cooperation metric sink used by this runner.
Sourcepub fn timeout_cadence_policy(&self) -> TimeoutCadencePolicy
pub fn timeout_cadence_policy(&self) -> TimeoutCadencePolicy
Returns the timeout cadence policy used by this runner.
Sourcepub fn run_attempt(&self, request: ExecutorRequest) -> AttemptOutcomeRecord
pub fn run_attempt(&self, request: ExecutorRequest) -> AttemptOutcomeRecord
Executes exactly one attempt and returns one terminal attempt outcome record.
Trait Implementations§
Source§impl<H: Clone, T: Clone> Clone for AttemptRunner<H, T>
impl<H: Clone, T: Clone> Clone for AttemptRunner<H, T>
Source§fn clone(&self) -> AttemptRunner<H, T>
fn clone(&self) -> AttemptRunner<H, T>
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 moreAuto Trait Implementations§
impl<H, T> Freeze for AttemptRunner<H, T>
impl<H, T> RefUnwindSafe for AttemptRunner<H, T>where
H: RefUnwindSafe,
T: RefUnwindSafe,
impl<H, T> Send for AttemptRunner<H, T>
impl<H, T> Sync for AttemptRunner<H, T>
impl<H, T> Unpin for AttemptRunner<H, T>
impl<H, T> UnsafeUnpin for AttemptRunner<H, T>where
H: UnsafeUnpin,
T: UnsafeUnpin,
impl<H, T> UnwindSafe for AttemptRunner<H, T>where
H: UnwindSafe,
T: UnwindSafe,
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