pub enum StepDurability {
Default,
Sync,
Async,
}Expand description
Controls when staged Step persistence must be durably acknowledged.
Sustained throughput is about the same across modes. Self::Async lowers latency and makes
individual Flows faster by acknowledging results before persistence completes.
Method overrides take precedence over the Flow configuration, which defaults to Sync.
WaitFor and Execute resolve their durability independently. Both modes enforce method,
heartbeat, and retry policies and preserve accepted heartbeat checkpoints.
Async can lose an unpersisted result after a server failure, replaying the method and later work that depended on it. Use idempotent effects or Sync for costly replays. Sync does not remove the need for idempotency when a handler’s external effect succeeds before its result.
With 1.35.0 (Server protocol 4): Sync persists attempt start before hand-out; Async persists it afterward. A server failure before an Async start is persisted can repeat the same attempt number without consuming a retry. Those executions may overlap, see different input, and repeat Stream output under the same source. Otherwise an interrupted attempt consumes a retry as possibly run. Durability changes affect only subsequently scheduled methods.
Variants§
Default
Uses the Flow or server default.
Sync
Waits for durable persistence before completing the handler request.
Async
Allows asynchronous persistence after accepting the handler result.
Trait Implementations§
Source§impl Clone for StepDurability
impl Clone for StepDurability
impl Copy for StepDurability
Source§impl Debug for StepDurability
impl Debug for StepDurability
impl Eq for StepDurability
Source§impl PartialEq for StepDurability
impl PartialEq for StepDurability
impl StructuralPartialEq for StepDurability
Auto Trait Implementations§
impl Forget for StepDurability
impl Freeze for StepDurability
impl RefUnwindSafe for StepDurability
impl Send for StepDurability
impl Sync for StepDurability
impl Unpin for StepDurability
impl UnsafeUnpin for StepDurability
impl UnwindSafe for StepDurability
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
T in a tonic::Request