Struct syn::FieldPat
[−]
[src]
pub struct FieldPat { pub ident: Ident, pub pat: Box<Pat>, pub is_shorthand: bool, pub attrs: Vec<Attribute>, }
A single field in a struct pattern
Patterns like the fields of Foo { x, ref y, ref mut z }
are treated the same as x: x, y: ref y, z: ref mut z
,
except is_shorthand
is true
Fields
ident: Ident
The identifier for the field
pat: Box<Pat>
The pattern the field is destructured to
is_shorthand: bool
attrs: Vec<Attribute>
Trait Implementations
impl ToTokens for FieldPat
[src]
impl Debug for FieldPat
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for FieldPat
[src]
fn clone(&self) -> FieldPat
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for FieldPat
[src]
impl PartialEq for FieldPat
[src]
fn eq(&self, __arg_0: &FieldPat) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &FieldPat) -> bool
[src]
This method tests for !=
.