[][src]Struct memur::Memory

pub struct Memory { /* fields omitted */ }

Container of shared memory blocks. Does not automatically de-allocate memory! Call cleanup method to de-allocate when it is the most convenient.

Implementations

impl Memory[src]

pub fn builder() -> MemoryBuilder[src]

pub fn new() -> Memory[src]

pub fn cleanup(&self) -> usize[src]

Cleans up the memory and returns cleaned-up memory size if the amount of free blocks is above max.

pub fn take_block(&mut self) -> Box<[u8]>[src]

pub fn return_block(&mut self, block: Box<[u8]>)[src]

Trait Implementations

impl Clone for Memory[src]

Auto Trait Implementations

impl RefUnwindSafe for Memory

impl Send for Memory

impl Sync for Memory

impl Unpin for Memory

impl UnwindSafe for Memory

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.