pub struct RecoveryProposer<R> { /* private fields */ }Expand description
Produces evidence-bound proposals without mutating repository state.
Implementations§
Source§impl<R: RecoveryRepository> RecoveryProposer<R>
impl<R: RecoveryRepository> RecoveryProposer<R>
Sourcepub fn new(
repository: R,
wall_clock: Arc<dyn Clock>,
monotonic_clock: Arc<dyn MonotonicClock>,
current_owner: OwnerToken,
) -> Self
pub fn new( repository: R, wall_clock: Arc<dyn Clock>, monotonic_clock: Arc<dyn MonotonicClock>, current_owner: OwnerToken, ) -> Self
Binds explicit repository, wall-clock, monotonic-clock, and process ownership evidence.
Sourcepub const fn with_stale_threshold(self, value: StaleThreshold) -> Self
pub const fn with_stale_threshold(self, value: StaleThreshold) -> Self
Replaces the validated stale threshold.
Sourcepub const fn with_max_clock_skew(self, value: MaxClockSkew) -> Self
pub const fn with_max_clock_skew(self, value: MaxClockSkew) -> Self
Replaces the validated clock-skew bound.
Sourcepub fn with_event_sink(self, sink: Arc<dyn TelemetryEventSink>) -> Self
pub fn with_event_sink(self, sink: Arc<dyn TelemetryEventSink>) -> Self
Attaches a non-authoritative, panic-isolated telemetry sink.
Sourcepub async fn propose(
&self,
execution_id: JobExecutionId,
) -> Result<RecoveryProposal, RecoveryError>
pub async fn propose( &self, execution_id: JobExecutionId, ) -> Result<RecoveryProposal, RecoveryError>
Gathers one bounded proposal without changing durable state.
§Errors
Rejects terminal/non-candidate state, current-process ownership, a candidate younger than the threshold, unusable clock evidence, or a repository failure.
Trait Implementations§
Auto Trait Implementations§
impl<R> !Freeze for RecoveryProposer<R>
impl<R> !RefUnwindSafe for RecoveryProposer<R>
impl<R> !UnwindSafe for RecoveryProposer<R>
impl<R> Send for RecoveryProposer<R>where
R: Send,
impl<R> Sync for RecoveryProposer<R>where
R: Sync,
impl<R> Unpin for RecoveryProposer<R>where
R: Unpin,
impl<R> UnsafeUnpin for RecoveryProposer<R>where
R: UnsafeUnpin,
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more