#[non_exhaustive]pub struct SuspendArgs {
pub suspension_id: SuspensionId,
pub waitpoints: Vec<WaitpointBinding>,
pub resume_condition: ResumeCondition,
pub resume_policy: ResumePolicy,
pub reason_code: SuspensionReasonCode,
pub requested_by: SuspensionRequester,
pub timeout_at: Option<TimestampMs>,
pub timeout_behavior: TimeoutBehavior,
pub continuation_metadata_pointer: Option<String>,
pub now: TimestampMs,
pub idempotency_key: Option<IdempotencyKey>,
}Expand description
Trait-surface input to [EngineBackend::suspend] (RFC-013 §2.2 +
RFC-014 Pattern 3 widening).
Built via SuspendArgs::new + with_* setters; direct struct-
literal construction across crate boundaries is not possible
(#[non_exhaustive]).
§Waitpoints
waitpoints is a non-empty Vec<WaitpointBinding>. The first entry
is the “primary” binding (accessible via primary)
and carries the current_waitpoint_id written onto exec_core for
operator visibility. Additional entries land in Valkey as their own
waitpoint hashes / signal streams / HMAC tokens, enabling RFC-014
Pattern 3 AllOf { members: [Single{wp1}, Single{wp2}, ...] } across
distinct heterogeneous subsystems.
SuspendArgs::new takes exactly the primary binding; call
with_waitpoint to append further bindings
(the RFC-014 builder API).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.suspension_id: SuspensionId§waitpoints: Vec<WaitpointBinding>RFC-014 Pattern 3: all waitpoint bindings for this suspension.
Guaranteed non-empty; waitpoints[0] is the primary.
resume_condition: ResumeCondition§resume_policy: ResumePolicy§reason_code: SuspensionReasonCode§requested_by: SuspensionRequester§timeout_at: Option<TimestampMs>§timeout_behavior: TimeoutBehavior§continuation_metadata_pointer: Option<String>§now: TimestampMs§idempotency_key: Option<IdempotencyKey>Implementations§
Source§impl SuspendArgs
impl SuspendArgs
Sourcepub fn new(
suspension_id: SuspensionId,
waitpoint: WaitpointBinding,
resume_condition: ResumeCondition,
resume_policy: ResumePolicy,
reason_code: SuspensionReasonCode,
now: TimestampMs,
) -> Self
pub fn new( suspension_id: SuspensionId, waitpoint: WaitpointBinding, resume_condition: ResumeCondition, resume_policy: ResumePolicy, reason_code: SuspensionReasonCode, now: TimestampMs, ) -> Self
Build a minimal SuspendArgs for a worker-originated suspension.
waitpoint becomes the primary binding. Append additional
bindings with with_waitpoint (RFC-014
Pattern 3) or replace the set with
with_waitpoints.
Defaults: requested_by = Worker, timeout_at = None,
timeout_behavior = Fail, continuation_metadata_pointer = None,
idempotency_key = None.
Sourcepub fn primary(&self) -> &WaitpointBinding
pub fn primary(&self) -> &WaitpointBinding
Primary binding — waitpoints[0]. Guaranteed present by
construction.
pub fn with_timeout(self, at: TimestampMs, behavior: TimeoutBehavior) -> Self
pub fn with_requester(self, requester: SuspensionRequester) -> Self
pub fn with_continuation_metadata_pointer(self, p: String) -> Self
pub fn with_idempotency_key(self, key: IdempotencyKey) -> Self
Sourcepub fn with_waitpoint(self, binding: WaitpointBinding) -> Self
pub fn with_waitpoint(self, binding: WaitpointBinding) -> Self
RFC-014 Pattern 3 — append a further waitpoint binding to this
suspension. Each additional binding yields its own waitpoint
hash, signal stream, condition hash and HMAC token in Valkey,
but all share the suspension record and composite evaluator
under one suspension:current.
Ordering: the primary (from SuspendArgs::new) stays at
waitpoints[0]; subsequent with_waitpoint calls append at the
tail.
Sourcepub fn with_waitpoints(self, bindings: Vec<WaitpointBinding>) -> Self
pub fn with_waitpoints(self, bindings: Vec<WaitpointBinding>) -> Self
RFC-014 Pattern 3 — replace the full binding vector in one call.
Must be non-empty; an empty Vec is a programmer error and will
be rejected by the backend’s validate_suspend_args with
waitpoints_empty.
Trait Implementations§
Source§impl Clone for SuspendArgs
impl Clone for SuspendArgs
Source§fn clone(&self) -> SuspendArgs
fn clone(&self) -> SuspendArgs
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more