Struct syntax::ast::FieldPat [] [src]

pub struct FieldPat {
    pub ident: Ident,
    pub pat: P<Pat>,
    pub is_shorthand: bool,
    pub attrs: ThinVec<Attribute>,
}
🔬 This is a nightly-only experimental API. (rustc_private)

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

🔬 This is a nightly-only experimental API. (rustc_private)

The identifier for the field

🔬 This is a nightly-only experimental API. (rustc_private)

The pattern the field is destructured to

🔬 This is a nightly-only experimental API. (rustc_private)
🔬 This is a nightly-only experimental API. (rustc_private)

Trait Implementations

impl Clone for FieldPat
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for FieldPat
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for FieldPat
[src]

impl Encodable for FieldPat
[src]

🔬 This is a nightly-only experimental API. (rustc_private)

deprecated in favor of rustc-serialize on crates.io

impl Decodable for FieldPat
[src]

🔬 This is a nightly-only experimental API. (rustc_private)

deprecated in favor of rustc-serialize on crates.io

impl Hash for FieldPat
[src]

Feeds this value into the state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.

impl Debug for FieldPat
[src]

Formats the value using the given formatter.

impl HasAttrs for FieldPat
[src]

🔬 This is a nightly-only experimental API. (rustc_private)

🔬 This is a nightly-only experimental API. (rustc_private)