pub enum AggregateRule {
ExhaustiveExactlyOnce,
NoRepeat,
DeclaredMultiplicity(DeclaredCounts),
DeclaredOmissions(DeclaredCounts),
ProjectedAggregate(ProjectedRule),
FreeOrder,
}Expand description
Aggregate rule data compiled from symbols into private canonical positions. Callers never provide raw ordinals.
Variants§
ExhaustiveExactlyOnce
Every alphabet symbol occurs exactly once.
NoRepeat
Symbols may be omitted but no symbol may repeat.
DeclaredMultiplicity(DeclaredCounts)
Explicit per-symbol multiplicity data.
DeclaredOmissions(DeclaredCounts)
Explicit set of omitted symbols; every other symbol occurs once.
ProjectedAggregate(ProjectedRule)
Explicit projection classes and their required multiplicities.
FreeOrder
Any finite order of alphabet members, including repeats.
Implementations§
Source§impl AggregateRule
impl AggregateRule
Sourcepub const fn exhaustive_exactly_once() -> Self
pub const fn exhaustive_exactly_once() -> Self
Constructs an exhaustive exactly-once rule.
Sourcepub const fn free_order() -> Self
pub const fn free_order() -> Self
Constructs a free-order rule.
Sourcepub fn declared_multiplicity<A, I>(
alphabet: &A,
declarations: I,
) -> Result<Self, AggregateRuleError>
pub fn declared_multiplicity<A, I>( alphabet: &A, declarations: I, ) -> Result<Self, AggregateRuleError>
Compiles an explicit positive multiplicity for every alphabet symbol.
Sourcepub fn declared_omissions<A, I>(
alphabet: &A,
omissions: I,
) -> Result<Self, AggregateRuleError>
pub fn declared_omissions<A, I>( alphabet: &A, omissions: I, ) -> Result<Self, AggregateRuleError>
Compiles a set of symbols to omit; every remaining symbol is required once.
Sourcepub fn projected_aggregate<A, I>(
alphabet: &A,
classes: I,
) -> Result<Self, AggregateRuleError>
pub fn projected_aggregate<A, I>( alphabet: &A, classes: I, ) -> Result<Self, AggregateRuleError>
Compiles a complete, disjoint projection of alphabet symbols into classes.
Sourcepub const fn kind(&self) -> AggregateRuleKind
pub const fn kind(&self) -> AggregateRuleKind
Returns the public category of this rule.
Sourcepub fn declared_counts<A>(
&self,
alphabet: &A,
) -> Result<Option<Vec<SymbolCount<A::Symbol>>>, AggregateRuleError>where
A: SerialAlphabet,
pub fn declared_counts<A>(
&self,
alphabet: &A,
) -> Result<Option<Vec<SymbolCount<A::Symbol>>>, AggregateRuleError>where
A: SerialAlphabet,
Returns symbol/count declarations for a declared multiplicity or omission rule.
Sourcepub fn projected_classes<A>(
&self,
alphabet: &A,
) -> Result<Option<Vec<ProjectedClassSpec<A::Symbol>>>, AggregateRuleError>where
A: SerialAlphabet,
pub fn projected_classes<A>(
&self,
alphabet: &A,
) -> Result<Option<Vec<ProjectedClassSpec<A::Symbol>>>, AggregateRuleError>where
A: SerialAlphabet,
Returns symbolic projected-class declarations for a projected rule.
Trait Implementations§
Source§impl Clone for AggregateRule
impl Clone for AggregateRule
Source§fn clone(&self) -> AggregateRule
fn clone(&self) -> AggregateRule
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more