#[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,
) -> SuspendArgs
pub fn new( suspension_id: SuspensionId, waitpoint: WaitpointBinding, resume_condition: ResumeCondition, resume_policy: ResumePolicy, reason_code: SuspensionReasonCode, now: TimestampMs, ) -> SuspendArgs
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, ) -> SuspendArgs
pub fn with_requester(self, requester: SuspensionRequester) -> SuspendArgs
pub fn with_continuation_metadata_pointer(self, p: String) -> SuspendArgs
pub fn with_idempotency_key(self, key: IdempotencyKey) -> SuspendArgs
Sourcepub fn with_waitpoint(self, binding: WaitpointBinding) -> SuspendArgs
pub fn with_waitpoint(self, binding: WaitpointBinding) -> SuspendArgs
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>) -> SuspendArgs
pub fn with_waitpoints(self, bindings: Vec<WaitpointBinding>) -> SuspendArgs
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 moreSource§impl Debug for SuspendArgs
impl Debug for SuspendArgs
Source§impl<'de> Deserialize<'de> for SuspendArgs
impl<'de> Deserialize<'de> for SuspendArgs
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SuspendArgs, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SuspendArgs, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for SuspendArgs
impl Serialize for SuspendArgs
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for SuspendArgs
impl RefUnwindSafe for SuspendArgs
impl Send for SuspendArgs
impl Sync for SuspendArgs
impl Unpin for SuspendArgs
impl UnsafeUnpin for SuspendArgs
impl UnwindSafe for SuspendArgs
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<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>
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>
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