Skip to main content

EvalContextExt

Trait EvalContextExt 

Source
pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> {
    // Provided methods
    fn try_get_meta<'a, T: MetaObj>(
        &'a self,
        ptr: Pointer,
    ) -> Result<&'a T, GetMetaError>
       where 'tcx: 'a { ... }
    fn insert_meta(
        &mut self,
        place: &MPlaceTy<'tcx>,
        obj: Box<dyn MetaObj>,
    ) -> InterpResult<'tcx> { ... }
    fn get_or_insert_meta<'a, T: MetaObj>(
        &'a mut self,
        place: &MPlaceTy<'tcx>,
        obj: impl FnOnce(&mut MiriInterpCx<'tcx>) -> InterpResult<'tcx, T>,
    ) -> InterpResult<'tcx, &'a mut T>
       where 'tcx: 'a { ... }
    fn remove_meta<'a, T: MetaObj>(
        &'a mut self,
        place: &MPlaceTy<'tcx>,
    ) -> InterpResult<'tcx, Option<Box<T>>> { ... }
}

Provided Methods§

Source

fn try_get_meta<'a, T: MetaObj>( &'a self, ptr: Pointer, ) -> Result<&'a T, GetMetaError>
where 'tcx: 'a,

Get the meta object that starts at the given offset.

Source

fn insert_meta( &mut self, place: &MPlaceTy<'tcx>, obj: Box<dyn MetaObj>, ) -> InterpResult<'tcx>

Source

fn get_or_insert_meta<'a, T: MetaObj>( &'a mut self, place: &MPlaceTy<'tcx>, obj: impl FnOnce(&mut MiriInterpCx<'tcx>) -> InterpResult<'tcx, T>, ) -> InterpResult<'tcx, &'a mut T>
where 'tcx: 'a,

Source

fn remove_meta<'a, T: MetaObj>( &'a mut self, place: &MPlaceTy<'tcx>, ) -> InterpResult<'tcx, Option<Box<T>>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'tcx> EvalContextExt<'tcx> for MiriInterpCx<'tcx>