Trait rustc_const_eval::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

Gets this value’s layout.

Makes this into an OpTy.

Creates this from an MPlaceTy.

Projects to the given enum variant.

Projects to the n-th field.

Implementors