Enum ra_ap_hir_def::expr::Expr [−][src]
pub enum Expr {}Show variants
Missing, Path(Path), If { condition: ExprId, then_branch: ExprId, else_branch: Option<ExprId>, }, Block { id: BlockId, statements: Vec<Statement>, tail: Option<ExprId>, label: Option<LabelId>, }, Loop { body: ExprId, label: Option<LabelId>, }, While { condition: ExprId, body: ExprId, label: Option<LabelId>, }, For { iterable: ExprId, pat: PatId, body: ExprId, label: Option<LabelId>, }, Call { callee: ExprId, args: Vec<ExprId>, }, MethodCall { receiver: ExprId, method_name: Name, args: Vec<ExprId>, generic_args: Option<Box<GenericArgs>>, }, Match { expr: ExprId, arms: Vec<MatchArm>, }, Continue { label: Option<Name>, }, Break { expr: Option<ExprId>, label: Option<Name>, }, Return { expr: Option<ExprId>, }, Yield { expr: Option<ExprId>, }, RecordLit { path: Option<Box<Path>>, fields: Vec<RecordLitField>, spread: Option<ExprId>, }, Field { expr: ExprId, name: Name, }, Await { expr: ExprId, }, Try { expr: ExprId, }, TryBlock { body: ExprId, }, Async { body: ExprId, }, Const { body: ExprId, }, Cast { expr: ExprId, type_ref: Interned<TypeRef>, }, Ref { expr: ExprId, rawness: Rawness, mutability: Mutability, }, Box { expr: ExprId, }, UnaryOp { expr: ExprId, op: UnaryOp, }, BinaryOp { lhs: ExprId, rhs: ExprId, op: Option<BinaryOp>, }, Range { lhs: Option<ExprId>, rhs: Option<ExprId>, range_type: RangeOp, }, Index { base: ExprId, index: ExprId, }, Lambda { args: Vec<PatId>, arg_types: Vec<Option<Interned<TypeRef>>>, ret_type: Option<Interned<TypeRef>>, body: ExprId, }, Tuple { exprs: Vec<ExprId>, }, Unsafe { body: ExprId, }, MacroStmts { tail: ExprId, }, Array(Array), Literal(Literal),
Variants
This is produced if the syntax tree does not have a required expression piece.
Path(Path)
Show fields
Show fields
Show fields
Show fields
Fields of Await
expr: ExprId
Show fields
Fields of Try
expr: ExprId
Show fields
Fields of TryBlock
body: ExprId
Show fields
Fields of Async
body: ExprId
Show fields
Fields of Const
body: ExprId
Show fields
Fields of Ref
Show fields
Fields of Box
expr: ExprId
Show fields
Show fields
Fields of Unsafe
body: ExprId
Show fields
Fields of MacroStmts
tail: ExprId
Array(Array)
Literal(Literal)
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Expr
impl UnwindSafe for Expr
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.