[][src]Struct rustc_ast::ast::FieldPat

pub struct FieldPat {
    pub ident: Ident,
    pub pat: P<Pat>,
    pub is_shorthand: bool,
    pub attrs: AttrVec,
    pub id: NodeId,
    pub span: Span,
    pub is_placeholder: bool,

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


ident: Ident

The identifier for the field

pat: P<Pat>

The pattern the field is destructured to

is_shorthand: boolattrs: AttrVecid: NodeIdspan: Spanis_placeholder: bool

Trait Implementations

impl Clone for FieldPat[src]

impl Debug for FieldPat[src]

impl Decodable for FieldPat[src]

impl Encodable for FieldPat[src]

impl HasAttrs for FieldPat[src]

Auto Trait Implementations

impl !RefUnwindSafe for FieldPat

impl !Send for FieldPat

impl !Sync for FieldPat

impl Unpin for FieldPat

impl !UnwindSafe for FieldPat

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> Decodable for T where
    T: UseSpecializedDecodable

impl<T> Encodable for T where
    T: UseSpecializedEncodable + ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.