Skip to main content

MemoryDescription

Trait MemoryDescription 

Source
pub trait MemoryDescription:
    Send
    + Sync
    + Debug {
    // Required methods
    fn addr(&self) -> usize;
    fn size(&self) -> usize;
    fn storage_kind(&self) -> StorageKind;
    fn as_any(&self) -> &dyn Any;
    fn nixl_descriptor(&self) -> Option<NixlDescriptor>;
}
Expand description

Core trait for memory regions that can be type-erased.

This is the only trait in the storage API. Concrete storage types implement this trait to enable type erasure via Arc<dyn MemoryDescription>.

Required Methods§

Source

fn addr(&self) -> usize

Base address of the memory region.

Source

fn size(&self) -> usize

Size of the memory region in bytes.

Source

fn storage_kind(&self) -> StorageKind

Type of storage backing this region.

Source

fn as_any(&self) -> &dyn Any

Enable downcasting to concrete type.

Source

fn nixl_descriptor(&self) -> Option<NixlDescriptor>

Get the NIXL descriptor for this memory region.

Implementors§