pub enum MatchPattern {
Path {
path: IdentPath,
bindings: Vec<PatternBinding>,
span: Span,
},
Constructor {
name: Spanned<ConstructorName>,
bindings: Vec<PatternBinding>,
span: Span,
},
IndexLabel {
index: Spanned<NamePath>,
variant: Spanned<IndexVariantName>,
span: Span,
},
}Expand description
A match pattern: Impulsive(delta_v: dv), Nominal, Maneuver.Departure.
Variants§
Path
Syntactic path pattern before semantic categorization.
The parser emits this for both constructor-looking and index-label-looking
patterns. Name resolution may rewrite it to Self::Constructor or
Self::IndexLabel only when it can prove that categorization from the
local symbol context. Qualified paths that require module-aware lookup
remain syntactic paths instead of being half-resolved.
Constructor
Tagged-union constructor pattern: Impulsive(delta_v: dv) or Nominal.
IndexLabel
Named-index label pattern: Maneuver.Departure.
Index labels are fieldless, so this variant deliberately has no binding payload. This variant is semantic: producers should construct it only after proving that the path denotes an index variant.
Implementations§
Source§impl MatchPattern
impl MatchPattern
Trait Implementations§
Source§impl Clone for MatchPattern
impl Clone for MatchPattern
Source§fn clone(&self) -> MatchPattern
fn clone(&self) -> MatchPattern
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 MatchPattern
impl Debug for MatchPattern
Source§impl FormatEquivalent for MatchPattern
impl FormatEquivalent for MatchPattern
Source§fn format_equivalent(&self, other: &Self) -> bool
fn format_equivalent(&self, other: &Self) -> bool
true if self and other are equivalent up to formatting.