#[non_exhaustive]pub enum ResumeCondition {
Single {
waitpoint_key: String,
matcher: SignalMatcher,
},
OperatorOnly,
TimeoutOnly,
Composite(CompositeBody),
}Expand description
Declarative resume condition for SuspendArgs::resume_condition.
RFC-013 §2.4 — typed replacement for the SDK’s former
ConditionMatcher / resume_condition_json pair.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Single
Single waitpoint-key match with a predicate. matcher is
evaluated against every signal delivered to waitpoint_key.
OperatorOnly
Operator-only resume — no signal satisfies; only an explicit operator resume closes the waitpoint.
TimeoutOnly
Pure-timeout suspension. No signal satisfier; the waitpoint
resolves only via timeout_behavior at timeout_at. Requires
SuspendArgs::timeout_at to be Some(_) — otherwise the
Rust-side validator rejects as timeout_only_without_deadline.
Composite(CompositeBody)
Multi-condition composition; RFC-014 defines the body.
Implementations§
Source§impl ResumeCondition
impl ResumeCondition
Sourcepub fn all_of_waitpoints<I, S>(waitpoint_keys: I) -> ResumeCondition
pub fn all_of_waitpoints<I, S>(waitpoint_keys: I) -> ResumeCondition
RFC-014 §10.3 builder — AllOf across N distinct waitpoints,
each member a Single { matcher: Wildcard } leaf. Canonical
Pattern 3 shape for heterogeneous-subsystem “all fired”
semantics (e.g. db-migration-complete + cache-warmed +
feature-flag-set).
Callers that need per-waitpoint matchers should construct the
tree directly via
[ResumeCondition::Composite(CompositeBody::all_of(..))].
Sourcepub fn referenced_waitpoint_keys(&self) -> Vec<String>
pub fn referenced_waitpoint_keys(&self) -> Vec<String>
Collect every distinct waitpoint_key the condition targets.
Used at suspend-time to validate the condition’s wp set against
SuspendArgs.waitpoints (RFC-014 §5.1 multi-binding cross-
check). Order follows tree DFS, de-duplicated preserving first
occurrence.
Sourcepub fn validate_composite(&self) -> Result<(), CompositeValidationError>
pub fn validate_composite(&self) -> Result<(), CompositeValidationError>
Validate RFC-014 structural invariants on a composite condition. Single / OperatorOnly / TimeoutOnly return Ok — they carry no composite body. Checks cover:
AllOf { members: [] }— §5.1allof_empty_membersCount { n: 0 }— §5.1count_n_zeroCount { waitpoints: [] }— §5.1count_waitpoints_emptyCount { n > waitpoints.len(), DistinctWaitpoints }— §5.1count_exceeds_waitpoint_set- depth >
MAX_COMPOSITE_DEPTH— §5.1condition_depth_exceeded
Trait Implementations§
Source§impl Clone for ResumeCondition
impl Clone for ResumeCondition
Source§fn clone(&self) -> ResumeCondition
fn clone(&self) -> ResumeCondition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResumeCondition
impl Debug for ResumeCondition
Source§impl<'de> Deserialize<'de> for ResumeCondition
impl<'de> Deserialize<'de> for ResumeCondition
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ResumeCondition, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ResumeCondition, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ResumeCondition
impl PartialEq for ResumeCondition
Source§impl Serialize for ResumeCondition
impl Serialize for ResumeCondition
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,
impl Eq for ResumeCondition
impl StructuralPartialEq for ResumeCondition
Auto Trait Implementations§
impl Freeze for ResumeCondition
impl RefUnwindSafe for ResumeCondition
impl Send for ResumeCondition
impl Sync for ResumeCondition
impl Unpin for ResumeCondition
impl UnsafeUnpin for ResumeCondition
impl UnwindSafe for ResumeCondition
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<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