#[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) -> Self
pub fn all_of_waitpoints<I, S>(waitpoint_keys: I) -> Self
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 more