pub struct StepHandle { /* private fields */ }Expand description
A handle passed to a step’s operation closure.
Its purpose is boundary deduplication: the closure reads StepHandle::idempotency_key and
forwards it to an external service (e.g. as an Idempotency-Key header) so a re-issued call
after an ambiguous crash is deduplicated at the boundary. The handle is Copy and carries no
secret material.
§Examples
use zeph_durable::{ExecutionId, IdempotencyKey, StepHandle, StepId};
// The closure can thread the idempotency key into an outbound request.
let _header_value = handle.idempotency_key();
let _which_step = handle.step_id();Implementations§
Source§impl StepHandle
impl StepHandle
Sourcepub fn idempotency_key(&self) -> IdempotencyKey
pub fn idempotency_key(&self) -> IdempotencyKey
The step’s idempotency key, suitable for forwarding to an external boundary for dedup.
Trait Implementations§
Source§impl Clone for StepHandle
impl Clone for StepHandle
Source§fn clone(&self) -> StepHandle
fn clone(&self) -> StepHandle
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 moreimpl Copy for StepHandle
Auto Trait Implementations§
impl Freeze for StepHandle
impl RefUnwindSafe for StepHandle
impl Send for StepHandle
impl Sync for StepHandle
impl Unpin for StepHandle
impl UnsafeUnpin for StepHandle
impl UnwindSafe for StepHandle
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> 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