Skip to main content

MemorySessionExt

Trait MemorySessionExt 

Source
pub trait MemorySessionExt: SessionExt {
    // Provided methods
    fn memory(&self) -> Ref<'_, MemorySession> { ... }
    fn allocator(&self) -> HostAllocatorRef { ... }
    fn memory_mut(&self) -> RefMut<'_, MemorySession> { ... }
}
Expand description

Extension trait for accessing session-scoped memory configuration.

Provided Methods§

Source

fn memory(&self) -> Ref<'_, MemorySession>

Returns the memory session for this execution/session context.

Source

fn allocator(&self) -> HostAllocatorRef

Returns the configured host allocator for this execution/session context.

Source

fn memory_mut(&self) -> RefMut<'_, MemorySession>

Returns mutable access to the memory session.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§