struct MatchPattern {
variant_name: String,
pattern: TokenStream,
num_args: usize,
pattern_vars: Vec<Ident>,
arg_types: Vec<Type>,
}
Fields§
§variant_name: String
The variant name, as a string.
pattern: TokenStream
The match pattern.
For instance: List::Cons(x0, x1)
num_args: usize
The number of arguments in the match pattern (including anonymous arguments).
pattern_vars: Vec<Ident>
The variables we introduced in the match pattern.
["x0", "x1"]
if the pattern is List::Cons(hd, tl)
.
arg_types: Vec<Type>
The types of the variables introduced in the match pattern
Auto Trait Implementations§
impl Freeze for MatchPattern
impl RefUnwindSafe for MatchPattern
impl !Send for MatchPattern
impl !Sync for MatchPattern
impl Unpin for MatchPattern
impl UnwindSafe for MatchPattern
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