pub enum Pat {
Wild,
Bind {
name: String,
inner: Option<Box<Pat>>,
},
Literal(LitPat),
Ctor {
ctor: CtorKind,
fields: Vec<Pat>,
},
Or(Vec<Pat>),
Range {
lo: Option<i128>,
hi: Option<i128>,
inclusive: bool,
},
}Expand description
A pattern in the pattern matrix
Variants§
Wild
Wildcard pattern
Bind
Binding pattern
Literal(LitPat)
Literal pattern
Ctor
Constructor pattern (enum variant, struct)
Or(Vec<Pat>)
Or-pattern
Range
Range pattern
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pat
impl RefUnwindSafe for Pat
impl Send for Pat
impl Sync for Pat
impl Unpin for Pat
impl UnwindSafe for Pat
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