Trait MemAlloc

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

    // Required methods
    fn device(&self) -> MemDevice;
    fn alloc(&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 device(&self) -> MemDevice

Source

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

Implementations on Foreign Types§

Source§

impl<A: MemAlloc> MemAlloc for Arc<A>

Source§

type Data = <A as MemAlloc>::Data

Source§

type Error = <A as MemAlloc>::Error

Source§

fn device(&self) -> MemDevice

Source§

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

Implementors§