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

pub trait AllocationExtra<Tag>: Clone + Debug {
    fn memory_read<'tcx>(
        _alloc: &Allocation<Tag, Self>,
        _ptr: Pointer<Tag>,
        _size: Size
    ) -> Result<(), InterpErrorInfo<'tcx>> { ... }
fn memory_written<'tcx>(
        _alloc: &mut Allocation<Tag, Self>,
        _ptr: Pointer<Tag>,
        _size: Size
    ) -> Result<(), InterpErrorInfo<'tcx>> { ... }
fn memory_deallocated<'tcx>(
        _alloc: &mut Allocation<Tag, Self>,
        _ptr: Pointer<Tag>,
        _size: Size
    ) -> Result<(), InterpErrorInfo<'tcx>> { ... } }
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Provided methods

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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
) -> Result<(), InterpErrorInfo<'tcx>>

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Hook for performing extra checks on a memory write access.

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

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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...