pub enum Message<T> {
Start,
Pause(LockId),
Resume(LockId),
Pull(PullDemand),
Dirty,
Data(T),
Resolved,
Invalidate,
Complete,
Error(GraphError),
Teardown,
}Expand description
One protocol message. A Vec<Message<T>> (Wave) is one wave (D8) and may
mix tiers. The closed set is 11 kinds (D9 + D269 + the Start handshake);
adding a kind is a constitutional change (/spec-amend).
Debug is hand-written to print only the kind tag (not the payload), so
Message<AnyValue> — whose payload Rc<dyn Any> is not Debug — stays
assertable: tests compare wave shapes like ["DIRTY", "DATA"].
Variants§
Start
Subscribe handshake (substrate-internal, not a user ctx.up kind).
Pause(LockId)
Acquire a pause lock (control, up-allowed).
Resume(LockId)
Release a pause lock (control, up-allowed).
Pull(PullDemand)
Demand one pull delivery from the matching pullId holder (control/demand,
up-allowed). RESUME is pause-lock release only (D269).
Dirty
Dirty notification — phase 1 of the two-phase wave (notification, up-allowed).
Data(T)
A real value (value tier, down-only). Absence-of-DATA is the SENTINEL
(None per D16), represented at the node’s per-dep cache, not as a message.
Resolved
Settle with no value change (value tier, down-only).
Invalidate
Invalidate-request — cache-drop, fire onInvalidate, cascade (settle,
up-allowed: a depless source honors it at the terminus per D38/R-up-at-source).
Complete
Terminal success (down-only).
Error(GraphError)
Terminal failure carrying the untyped error (down-only, D31).
Teardown
Teardown (up-allowed; a depless source drops it per D38).
Implementations§
Source§impl<T> Message<T>
impl<T> Message<T>
Sourcepub fn is_up_allowed(&self) -> bool
pub fn is_up_allowed(&self) -> bool
Whether this kind may travel upstream via ctx.up (R-ctx-up).
Control/demand-tier only: DIRTY / PAUSE / RESUME / PULL /
INVALIDATE / TEARDOWN.
DATA / RESOLVED / COMPLETE / ERROR are down-only. START is a
substrate handshake, not a user ctx.up kind.