pub enum Pattern {
Wildcard(Span),
Int(i64, Span),
Str(String, Span),
Bool(bool, Span),
Variant {
name: String,
bindings: Vec<String>,
span: Span,
},
}Expand description
What a match arm tests for.
Variants§
Wildcard(Span)
_ — matches anything, binds nothing.
Int(i64, Span)
A literal value: 0, "hi", true.
Str(String, Span)
Bool(bool, Span)
Variant
An enum case, optionally capturing its values: dot, circle(let r).
Implementations§
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