Enum ra_ap_hir_def::expr::Pat [−][src]
pub enum Pat {
Show 14 variants
Missing,
Wild,
Tuple {
args: Vec<PatId>,
ellipsis: Option<usize>,
},
Or(Vec<PatId>),
Record {
path: Option<Box<Path>>,
args: Vec<RecordFieldPat>,
ellipsis: bool,
},
Range {
start: ExprId,
end: ExprId,
},
Slice {
prefix: Vec<PatId>,
slice: Option<PatId>,
suffix: Vec<PatId>,
},
Path(Box<Path>),
Lit(ExprId),
Bind {
mode: BindingAnnotation,
name: Name,
subpat: Option<PatId>,
},
TupleStruct {
path: Option<Box<Path>>,
args: Vec<PatId>,
ellipsis: Option<usize>,
},
Ref {
pat: PatId,
mutability: Mutability,
},
Box {
inner: PatId,
},
ConstBlock(ExprId),
}
Expand description
Close relative to rustc’s hir::PatKind
Variants
Lit(ExprId)
Tuple Fields of Lit
0: ExprId
Fields of Bind
Fields of Ref
pat: PatId
mutability: Mutability
Fields of Box
inner: PatId
ConstBlock(ExprId)
Tuple Fields of ConstBlock
0: ExprId
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Pat
impl UnwindSafe for Pat
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more