Struct rustc_mir::interpret::operand::OpTy [−][src]
pub struct OpTy<'tcx, Tag = ()> { op: Operand<Tag>, pub layout: TyAndLayout<'tcx>, }
Fields
op: Operand<Tag>layout: TyAndLayout<'tcx>Implementations
pub fn try_as_mplace(
&self,
cx: &impl HasDataLayout
) -> Result<MPlaceTy<'tcx, Tag>, ImmTy<'tcx, Tag>>
pub fn try_as_mplace(
&self,
cx: &impl HasDataLayout
) -> Result<MPlaceTy<'tcx, Tag>, ImmTy<'tcx, Tag>>Note: do not call as_ref on the resulting place. This function should only be used to
read from the resulting mplace, not to get its address back.
Note: do not call as_ref on the resulting place. This function should only be used to
read from the resulting mplace, not to get its address back.
Trait Implementations
impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> Value<'mir, 'tcx, M> for OpTy<'tcx, M::PointerTag>
impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> Value<'mir, 'tcx, M> for OpTy<'tcx, M::PointerTag>Gets this value’s layout.
fn to_op(
&self,
_ecx: &InterpCx<'mir, 'tcx, M>
) -> InterpResult<'tcx, OpTy<'tcx, M::PointerTag>>
fn to_op(
&self,
_ecx: &InterpCx<'mir, 'tcx, M>
) -> InterpResult<'tcx, OpTy<'tcx, M::PointerTag>>Makes this into an OpTy.
Creates this from an MPlaceTy.
fn project_downcast(
&self,
ecx: &InterpCx<'mir, 'tcx, M>,
variant: VariantIdx
) -> InterpResult<'tcx, Self>
fn project_downcast(
&self,
ecx: &InterpCx<'mir, 'tcx, M>,
variant: VariantIdx
) -> InterpResult<'tcx, Self>Projects to the given enum variant.
fn project_field(
&self,
ecx: &InterpCx<'mir, 'tcx, M>,
field: usize
) -> InterpResult<'tcx, Self>
fn project_field(
&self,
ecx: &InterpCx<'mir, 'tcx, M>,
field: usize
) -> InterpResult<'tcx, Self>Projects to the n-th field.
Auto Trait Implementations
impl<'tcx, Tag = ()> !RefUnwindSafe for OpTy<'tcx, Tag>impl<'tcx, Tag = ()> !UnwindSafe for OpTy<'tcx, Tag>Blanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.