Struct syntex_syntax::ast::FieldPat [] [src]

pub struct FieldPat {
    pub ident: Ident,
    pub pat: P<Pat>,
    pub is_shorthand: bool,
}

A single field in a struct pattern

Patterns like the fields of Foo { x, ref y, ref mut z } are treated the same asx: x, y: ref y, z: ref mut z, except is_shorthand is true

Fields

ident

The identifier for the field

pat

The pattern the field is destructured to

is_shorthand

Trait Implementations

Derived Implementations

impl Debug for FieldPat

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Hash for FieldPat

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl Decodable for FieldPat

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<FieldPat, __D::Error>

impl Encodable for FieldPat

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl Eq for FieldPat

impl PartialEq for FieldPat

fn eq(&self, __arg_0: &FieldPat) -> bool

fn ne(&self, __arg_0: &FieldPat) -> bool

impl Clone for FieldPat

fn clone(&self) -> FieldPat

fn clone_from(&mut self, source: &Self)