pub struct RuleMeta {
pub key: RuleKey,
pub enabled_by_packages: &'static [PackageName],
pub level: NormalizationLevel,
pub summary: &'static str,
pub fidelity: RuleFidelity,
pub triggers: &'static [RuleTarget],
pub consumes: RuleConsumes,
pub produces: RuleProduces,
}Expand description
Static metadata bundle that fully describes a rule’s identity, scheduling, and dependency contract.
The rewrite phase uses triggers and consumes to decide when to attempt a
rule, produces to verify convergence, and fidelity for the rule’s
render-fidelity contract.
Fields§
§key: RuleKeyUnique identifier for this rule.
enabled_by_packages: &'static [PackageName]Packages that make this rule loadable when any one of them is enabled.
level: NormalizationLevelOrdered normalization level used by transform profiles.
summary: &'static strOne-line human-readable description of what the rule does.
fidelity: RuleFidelityWorst-case render-fidelity guarantee over the rule’s declared input domain.
triggers: &'static [RuleTarget]Commands, environments, or characters that decide where the engine attempts this rule.
Triggers must be non-empty. They only affect scheduling and do not participate in eliminated-form contracts or dependency analysis.
consumes: RuleConsumesCommands, environments, or characters this rule removes from, reads, or modifies in the AST.
produces: RuleProducesCommands, environments, or characters this rule may introduce into the AST.
Trait Implementations§
impl Copy for RuleMeta
impl Eq for RuleMeta
impl StructuralPartialEq for RuleMeta
Auto Trait Implementations§
impl Freeze for RuleMeta
impl RefUnwindSafe for RuleMeta
impl Send for RuleMeta
impl Sync for RuleMeta
impl Unpin for RuleMeta
impl UnsafeUnpin for RuleMeta
impl UnwindSafe for RuleMeta
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.