Trait rustc_mir::interpret::visitor::Value[−][src]

pub trait Value<'mir, 'tcx, M: Machine<'mir, 'tcx>>: Copy {
    fn layout(&self) -> TyAndLayout<'tcx>;
fn to_op(
        &self,
        ecx: &InterpCx<'mir, 'tcx, M>
    ) -> InterpResult<'tcx, OpTy<'tcx, M::PointerTag>>;
fn from_mem_place(mplace: MPlaceTy<'tcx, M::PointerTag>) -> Self;
fn project_downcast(
        &self,
        ecx: &InterpCx<'mir, 'tcx, M>,
        variant: VariantIdx
    ) -> InterpResult<'tcx, Self>;
fn project_field(
        &self,
        ecx: &InterpCx<'mir, 'tcx, M>,
        field: usize
    ) -> InterpResult<'tcx, Self>; }

Required methods

fn layout(&self) -> TyAndLayout<'tcx>[src]

Gets this value’s layout.

fn to_op(
    &self,
    ecx: &InterpCx<'mir, 'tcx, M>
) -> InterpResult<'tcx, OpTy<'tcx, M::PointerTag>>
[src]

Makes this into an OpTy.

fn from_mem_place(mplace: MPlaceTy<'tcx, M::PointerTag>) -> Self[src]

Creates this from an MPlaceTy.

fn project_downcast(
    &self,
    ecx: &InterpCx<'mir, 'tcx, M>,
    variant: VariantIdx
) -> InterpResult<'tcx, Self>
[src]

Projects to the given enum variant.

fn project_field(
    &self,
    ecx: &InterpCx<'mir, 'tcx, M>,
    field: usize
) -> InterpResult<'tcx, Self>
[src]

Projects to the n-th field.

Loading content...

Implementors

impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> Value<'mir, 'tcx, M> for OpTy<'tcx, M::PointerTag>[src]

impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> Value<'mir, 'tcx, M> for MPlaceTy<'tcx, M::PointerTag>[src]

Loading content...