Trait MemoryAllocator

Source
pub trait MemoryAllocator {
    type Data: MemBlock;
    type Error: Error + Send + Sync + 'static;

    // Required methods
    fn memory_type(&self) -> MemoryType;
    fn alloc_frame(&self, data: &[u8]) -> Result<Self::Data, Self::Error>;
}

Required Associated Types§

Source

type Data: MemBlock

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

fn memory_type(&self) -> MemoryType

Source

fn alloc_frame(&self, data: &[u8]) -> Result<Self::Data, Self::Error>

Implementations on Foreign Types§

Source§

impl<A: MemoryAllocator> MemoryAllocator for Arc<A>

Source§

type Data = <A as MemoryAllocator>::Data

Source§

type Error = <A as MemoryAllocator>::Error

Source§

fn memory_type(&self) -> MemoryType

Source§

fn alloc_frame(&self, data: &[u8]) -> Result<Self::Data, Self::Error>

Implementors§