Enum rustc_typeck::hir::PatKind [] [src]

pub enum PatKind {
    Wild,
    Binding(BindingModeDefIdSpanned<Symbol>, Option<P<Pat>>),
    Struct(QPathP<[Spanned<FieldPat>]>, bool),
    TupleStruct(QPathP<[P<Pat>]>, Option<usize>),
    Path(QPath),
    Tuple(P<[P<Pat>]>, Option<usize>),
    Box(P<Pat>),
    Ref(P<Pat>, Mutability),
    Lit(P<Expr>),
    Range(P<Expr>, P<Expr>, RangeEnd),
    Slice(P<[P<Pat>]>, Option<P<Pat>>, P<[P<Pat>]>),
}
🔬 This is a nightly-only experimental API. (rustc_private)

Variants

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

Represents a wildcard pattern (_)

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

A fresh binding ref mut binding @ OPT_SUBPATTERN. The DefId is for the definition of the variable being bound.

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

A struct or struct variant pattern, e.g. Variant {x, y, ..}. The bool is true in the presence of a ...

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

A tuple struct/variant pattern Variant(x, y, .., z). If the .. pattern fragment is present, then Option<usize> denotes its position. 0 <= position <= subpats.len()

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

A path pattern for an unit struct/variant or a (maybe-associated) constant.

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

A tuple pattern (a, b). If the .. pattern fragment is present, then Option<usize> denotes its position. 0 <= position <= subpats.len()

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

A box pattern

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

A reference pattern, e.g. &mut (a, b)

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

A literal

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

A range pattern, e.g. 1...2 or 1..2

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

[a, b, ..i, y, z] is represented as: PatKind::Slice(box [a, b], Some(i), box [y, z])

Trait Implementations

impl Decodable for PatKind
[src]

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

impl PartialEq<PatKind> for PatKind
[src]

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

This method tests for !=.

impl Hash for PatKind
[src]

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

Feeds a slice of this type into the state provided.

impl Clone for PatKind
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for PatKind
[src]

impl Debug for PatKind
[src]

Formats the value using the given formatter.

impl Encodable for PatKind
[src]

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