[−][src]Trait rustc_mir::interpret::AllocationExtra

pub trait AllocationExtra<Tag>: Clone + Debug {
    pub fn memory_read<'tcx>(
        _alloc: &Allocation<Tag, Self>,
        _ptr: Pointer<Tag>,
        _size: Size
    ) -> Result<(), InterpErrorInfo<'tcx>> { ... }
pub fn memory_written<'tcx>(
        _alloc: &mut Allocation<Tag, Self>,
        _ptr: Pointer<Tag>,
        _size: Size
    ) -> Result<(), InterpErrorInfo<'tcx>> { ... }
pub fn memory_deallocated<'tcx>(
        _alloc: &mut Allocation<Tag, Self>,
        _ptr: Pointer<Tag>,
        _size: Size
    ) -> Result<(), InterpErrorInfo<'tcx>> { ... } }

Provided methods

pub fn memory_read<'tcx>(
    _alloc: &Allocation<Tag, Self>,
    _ptr: Pointer<Tag>,
    _size: Size
) -> Result<(), InterpErrorInfo<'tcx>>
[src]

Hook for performing extra checks on a memory read access.

Takes read-only access to the allocation so we can keep all the memory read operations take &self. Use a RefCell in AllocExtra if you need to mutate.

pub fn memory_written<'tcx>(
    _alloc: &mut Allocation<Tag, Self>,
    _ptr: Pointer<Tag>,
    _size: Size
) -> Result<(), InterpErrorInfo<'tcx>>
[src]

Hook for performing extra checks on a memory write access.

pub fn memory_deallocated<'tcx>(
    _alloc: &mut Allocation<Tag, Self>,
    _ptr: Pointer<Tag>,
    _size: Size
) -> Result<(), InterpErrorInfo<'tcx>>
[src]

Hook for performing extra checks on a memory deallocation. size will be the size of the allocation.

Loading content...

Implementors

Loading content...