Trait rustc_middle::mir::interpret::allocation::AllocationExtra[−][src]

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

Provided methods

fn memory_read<'tcx>(
    _alloc: &Allocation<Tag, Self>,
    _ptr: Pointer<Tag>,
    _size: Size
) -> InterpResult<'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.

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

Hook for performing extra checks on a memory write access.

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

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

Loading content...

Implementations on Foreign Types

impl AllocationExtra<()> for ()[src]

Loading content...

Implementors

Loading content...