pub struct WakePolicy {
pub site: DefinitionId,
pub condition: Option<DefinitionId>,
pub source: WakeSource,
}Expand description
A parked flow’s wake policy (docs/flow-suspension-spec.md §2 point 4):
await-site id + condition fn token + host-source discriminant, all
name-stable. See docs/effects-spec.md §13.1 for the wake contract this
plugs into (persistent-by-default policies, wake_once, host
cancellation) — that contract’s runtime enforcement is FS-3/FS-4 scope;
this type only carries the wire shape.
Fields§
§site: DefinitionIdThe await site’s synthesized resume-container id — site-stable
identity, so the general anonymous-fn identity problem does not
apply here (docs/flow-suspension-spec.md §3).
condition: Option<DefinitionId>The condition’s compiler-synthesized pure-fn token
(docs/flow-suspension-spec.md §3: “direct-expression conditions
capture as compiler-synthesized pure fns”). Absent for a policy whose
Self::source is WakeSource::Host — a host-driven wake trigger
(next-frame, external event) has no compiled ink condition fn to
token (§3: “an ink spelling for them is PROPOSED-only”).
source: WakeSourceWhere the wake nudge originates.
Trait Implementations§
Source§impl Clone for WakePolicy
impl Clone for WakePolicy
Source§fn clone(&self) -> WakePolicy
fn clone(&self) -> WakePolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more