[][src]Enum ra_ap_hir_def::expr::Pat

pub enum Pat {
    Missing,
    Wild,
    Tuple {
        args: Vec<PatId>,
        ellipsis: Option<usize>,
    },
    Or(Vec<PatId>),
    Record {
        path: Option<Path>,
        args: Vec<RecordFieldPat>,
        ellipsis: bool,
    },
    Range {
        start: ExprId,
        end: ExprId,
    },
    Slice {
        prefix: Vec<PatId>,
        slice: Option<PatId>,
        suffix: Vec<PatId>,
    },
    Path(Path),
    Lit(ExprId),
    Bind {
        mode: BindingAnnotation,
        name: Name,
        subpat: Option<PatId>,
    },
    TupleStruct {
        path: Option<Path>,
        args: Vec<PatId>,
        ellipsis: Option<usize>,
    },
    Ref {
        pat: PatId,
        mutability: Mutability,
    },
}

Close relative to rustc's hir::PatKind

Variants

Missing
Wild
Tuple

Fields of Tuple

args: Vec<PatId>ellipsis: Option<usize>
Or(Vec<PatId>)
Record

Fields of Record

path: Option<Path>args: Vec<RecordFieldPat>ellipsis: bool
Range

Fields of Range

start: ExprIdend: ExprId
Slice

Fields of Slice

prefix: Vec<PatId>slice: Option<PatId>suffix: Vec<PatId>
Path(Path)
Lit(ExprId)
Bind

Fields of Bind

mode: BindingAnnotationname: Namesubpat: Option<PatId>
TupleStruct

Fields of TupleStruct

path: Option<Path>args: Vec<PatId>ellipsis: Option<usize>
Ref

Fields of Ref

pat: PatIdmutability: Mutability

Implementations

impl Pat[src]

pub fn walk_child_pats(&self, f: impl FnMut(PatId))[src]

Trait Implementations

impl Clone for Pat[src]

impl Debug for Pat[src]

impl Eq for Pat[src]

impl PartialEq<Pat> for Pat[src]

impl StructuralEq for Pat[src]

impl StructuralPartialEq for Pat[src]

Auto Trait Implementations

impl RefUnwindSafe for Pat

impl Send for Pat

impl Sync for Pat

impl Unpin for Pat

impl UnwindSafe for Pat

Blanket Implementations

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

impl<T> Any for T where
    T: Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Clone + Any
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.