#[non_exhaustive]pub struct SectionRule {
pub id: Option<RuleId>,
pub matcher: Matcher,
pub outcome: RuleOutcome,
pub strict: bool,
pub ordered: bool,
pub sections: Vec<SectionRule>,
pub constraints: Vec<Constraint>,
}Expand description
A rule for headers within one scope.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: Option<RuleId>The explicit or generated identifier used by constraints.
Non-exact matchers without an explicit identifier remain None.
matcher: MatcherThe header matcher for this rule.
outcome: RuleOutcomeWhether matching headers are accepted and, if so, their cardinality.
strict: boolWhether headers unmatched by a child rule are rejected.
ordered: boolWhether the child rules bind in document order: every header matched
by an earlier accepting rule must precede every header matched by a
later one (specification §3.7). Resolved from the rule’s own ordered
key or, absent that, Options::ordered_sections.
sections: Vec<SectionRule>Rules for direct child headers, in first-match order.
constraints: Vec<Constraint>Presence and ordering constraints attached to the child scope.
Trait Implementations§
Source§impl Clone for SectionRule
impl Clone for SectionRule
Source§fn clone(&self) -> SectionRule
fn clone(&self) -> SectionRule
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SectionRule
impl Debug for SectionRule
impl Eq for SectionRule
Source§impl PartialEq for SectionRule
impl PartialEq for SectionRule
impl StructuralPartialEq for SectionRule
Auto Trait Implementations§
impl Freeze for SectionRule
impl RefUnwindSafe for SectionRule
impl Send for SectionRule
impl Sync for SectionRule
impl Unpin for SectionRule
impl UnsafeUnpin for SectionRule
impl UnwindSafe for SectionRule
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
Mutably borrows from an owned value. Read more
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
Compare self to
key and return true if they are equal.