pub enum LoweredExpr<'db> {
AtVariable(VarUsage<'db>),
Tuple {
exprs: Vec<LoweredExpr<'db>>,
location: LocationId<'db>,
},
FixedSizeArray {
ty: TypeId<'db>,
exprs: Vec<LoweredExpr<'db>>,
location: LocationId<'db>,
},
ExternEnum(LoweredExprExternEnum<'db>),
MemberPath(ExprVarMemberPath<'db>, LocationId<'db>),
Snapshot {
expr: Box<LoweredExpr<'db>>,
location: LocationId<'db>,
},
}Expand description
Representation of the value of a computed expression.
Variants§
AtVariable(VarUsage<'db>)
The expression value lies in a variable.
Tuple
The expression value is a tuple.
FixedSizeArray
The expression value is a fixed size array.
ExternEnum(LoweredExprExternEnum<'db>)
The expression value is an enum result from an extern call.
MemberPath(ExprVarMemberPath<'db>, LocationId<'db>)
The expression value resides at a specific member path.
Snapshot
Implementations§
Source§impl<'db> LoweredExpr<'db>
impl<'db> LoweredExpr<'db>
Sourcepub fn as_var_usage(
self,
ctx: &mut LoweringContext<'db, '_>,
builder: &mut BlockBuilder<'db>,
) -> LoweringResult<'db, VarUsage<'db>>
pub fn as_var_usage( self, ctx: &mut LoweringContext<'db, '_>, builder: &mut BlockBuilder<'db>, ) -> LoweringResult<'db, VarUsage<'db>>
Returns a VarUsage corresponding to the lowered expression.
pub fn ty(&self, ctx: &mut LoweringContext<'db, '_>) -> TypeId<'db>
pub fn location(&self) -> LocationId<'db>
Trait Implementations§
Source§impl<'db> Clone for LoweredExpr<'db>
impl<'db> Clone for LoweredExpr<'db>
Source§fn clone(&self) -> LoweredExpr<'db>
fn clone(&self) -> LoweredExpr<'db>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'db> Freeze for LoweredExpr<'db>
impl<'db> RefUnwindSafe for LoweredExpr<'db>
impl<'db> Send for LoweredExpr<'db>
impl<'db> Sync for LoweredExpr<'db>
impl<'db> Unpin for LoweredExpr<'db>
impl<'db> UnwindSafe for LoweredExpr<'db>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'db, T> DebugDbUpcast<'db, T> for Twhere
T: ?Sized,
impl<'db, T> DebugDbUpcast<'db, T> for Twhere
T: ?Sized,
fn debug_db_upcast(&'db self) -> &'db T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more