#[non_exhaustive]pub enum Constraint {
OneOf(AtLeastTwo<Proposition>),
AnyOf(AtLeastTwo<Proposition>),
AtMostOne(AtLeastTwo<Proposition>),
AllOrNone(AtLeastTwo<Proposition>),
Requires {
condition: Proposition,
consequences: NonEmpty<Proposition>,
},
Conflicts {
condition: Proposition,
exclusions: NonEmpty<Proposition>,
},
Ordered(AtLeastTwo<RuleRef>),
}Expand description
A cross-section presence or ordering constraint.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
OneOf(AtLeastTwo<Proposition>)
Exactly one proposition must be satisfied.
AnyOf(AtLeastTwo<Proposition>)
At least one proposition must be satisfied.
AtMostOne(AtLeastTwo<Proposition>)
Zero or one proposition may be satisfied.
AllOrNone(AtLeastTwo<Proposition>)
Either all propositions or none of them must be satisfied.
Requires
If condition is satisfied, every consequence must be satisfied.
Fields
condition: PropositionProposition that activates the requirement.
consequences: NonEmpty<Proposition>Propositions required whenever the condition is satisfied.
Conflicts
If condition is satisfied, every exclusion must be unsatisfied.
Fields
condition: PropositionProposition that activates the conflict.
exclusions: NonEmpty<Proposition>Propositions forbidden whenever the condition is satisfied.
Ordered(AtLeastTwo<RuleRef>)
Every occurrence of each satisfied ref must precede every occurrence of
the next satisfied ref (last(A) < first(B)).
Frontmatter propositions are excluded because they have no document position among headers.
Trait Implementations§
Source§impl Clone for Constraint
impl Clone for Constraint
Source§fn clone(&self) -> Constraint
fn clone(&self) -> Constraint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Constraint
impl Debug for Constraint
impl Eq for Constraint
Source§impl PartialEq for Constraint
impl PartialEq for Constraint
impl StructuralPartialEq for Constraint
Auto Trait Implementations§
impl Freeze for Constraint
impl RefUnwindSafe for Constraint
impl Send for Constraint
impl Sync for Constraint
impl Unpin for Constraint
impl UnsafeUnpin for Constraint
impl UnwindSafe for Constraint
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.