pub struct Plan<K: Kind> { /* private fields */ }Expand description
One plan: the complete output set of one request, named before any syntax exists.
Every seat is required, and the seats that could have been empty are shapes that cannot be — the output set, the watch set, the trace, and the trail are all structurally non-empty. Only the nonclaims may be empty, because a plan that claims exactly what it does has none to state.
The account is not a copy of anything: it is the value the caller walked in with, moved into the plan, so the plan’s own answer to “what were you planned over” is what its identity, its watch set, and its origin edges were all read off.
Implementations§
Source§impl<K: Kind> Plan<K>
impl<K: Kind> Plan<K>
Sourcepub fn planned(
account: Account<K>,
decided_under: Context,
decisions: PlanDecisions<K::Role>,
) -> Self
pub fn planned( account: Account<K>, decided_under: Context, decisions: PlanDecisions<K::Role>, ) -> Self
Plans one projection over the account the content walked in with.
The account arrives first because it is what was MEANT; the context is what that intent was decided under, and the decisions are the record of the decision. Total: everything that could refuse refused where it was declared, so a plan is assembled out of values that already hold.
Sourcepub const fn provenance(&self) -> &Provenance
pub const fn provenance(&self) -> &Provenance
The record of how that identity was derived.
Sourcepub const fn account(&self) -> &Account<K>
pub const fn account(&self) -> &Account<K>
The account this plan was planned over, whole.
A reader asking what invalidates it, what caused it, or what it stands on reads the seats of this value rather than a summary of them.
Sourcepub fn intent(&self) -> Intent
pub fn intent(&self) -> Intent
What this plan MEANT.
The comparison equivalence is stated over — never the plan identity, which carries origin and is required to differ between distinct requests. Read off the plan’s own account, so the intent a plan reports and the intent its transcript opened with are one derivation rather than two.
Sourcepub const fn membership(&self) -> &Membership<K::Role>
pub const fn membership(&self) -> &Membership<K::Role>
The complete declared output set.
Sourcepub fn invalidation(&self) -> &InvalidationSet
pub fn invalidation(&self) -> &InvalidationSet
The triggers whose change invalidates this plan; structurally at least one.
Sourcepub const fn trace(&self) -> &DecisionTrace
pub const fn trace(&self) -> &DecisionTrace
The decisions that produced this plan, in selection order.
Sourcepub const fn origin(&self) -> &OriginTrail
pub const fn origin(&self) -> &OriginTrail
Where this plan itself came from.