pub enum Pattern {
Wildcard,
Bind(LocalId),
LitInt(i64),
LitBool(bool),
LitStr(String),
Variant {
sum: DefId,
variant: u32,
binders: Vec<Option<LocalId>>,
},
}Expand description
Patterns after checking. Phase 1 supports flat patterns: variant
destructuring binds directly to locals (or discards with None).
Variants§
Wildcard
_
Bind(LocalId)
A catch-all binding: n => ...
LitInt(i64)
LitBool(bool)
LitStr(String)
Variant
Variant(a, _, c) — one binder slot per payload field.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pattern
impl RefUnwindSafe for Pattern
impl Send for Pattern
impl Sync for Pattern
impl Unpin for Pattern
impl UnsafeUnpin for Pattern
impl UnwindSafe for Pattern
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