pub enum InvalidationTrigger {
CapturedDeclaration {
watched: Identity<CapturedDeclaration>,
},
Profile {
watched: Profile,
},
Generator {
watched: Identity<GeneratorVersion>,
},
ProjectionContent {
watched: Identity<ProjectionContent>,
},
Declared {
name: &'static str,
watched: OwnerIdentity,
},
}Expand description
One thing whose change makes a plan stale, and exactly which thing it watches.
A relevant change invalidates loudly and names what moved; a change no row watches — formatting, declaration order, an alias — touches nothing, because nothing watches those.
Variants§
CapturedDeclaration
A captured declaration the plan stands on.
Fields
watched: Identity<CapturedDeclaration>The watched capture.
Profile
The profile the plan was decided under, at the version it was decided at.
Generator
The generator that produced the plan.
Fields
watched: Identity<GeneratorVersion>The watched generator version.
ProjectionContent
The kind-specific content commitment the plan was decided over.
Fields
watched: Identity<ProjectionContent>The watched content commitment.
Declared
Anything else a consumer declared this plan watches.
One row rather than a row per consumer noun: a mechanism profile, a work formula, and a fixture population are three consumers’ facts, and a compiler that enumerated them would be minting vocabulary for meanings it does not own.
Fields
watched: OwnerIdentityThe identity that moving is watched by.
Implementations§
Source§impl InvalidationTrigger
impl InvalidationTrigger
Sourcepub fn encode_into(&self, into: &mut Vec<u8>)
pub fn encode_into(&self, into: &mut Vec<u8>)
Appends this trigger’s canonical bytes: the row’s discriminant, then what it watches.
Two rows watching one thing never encode alike, because the discriminant rides ahead of the material.
Source§impl InvalidationTrigger
impl InvalidationTrigger
Sourcepub fn one_watched(trigger: Self) -> InvalidationSet
pub fn one_watched(trigger: Self) -> InvalidationSet
The one-trigger watch set. Total: one trigger always fits.
Sourcepub fn watched(
first: Self,
rest: Vec<Self>,
) -> Result<InvalidationSet, PlanError>
pub fn watched( first: Self, rest: Vec<Self>, ) -> Result<InvalidationSet, PlanError>
Watches these triggers, the first one and the rest.
Several triggers of one row are lawful where they watch distinct things.
§Errors
Returns the planning refusal naming BoundAxis::Triggers where the set outgrows TRIGGER_LIMIT.
Trait Implementations§
Source§impl Clone for InvalidationTrigger
impl Clone for InvalidationTrigger
Source§fn clone(&self) -> InvalidationTrigger
fn clone(&self) -> InvalidationTrigger
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more