[][src]Struct memur::MemoryBuilder

pub struct MemoryBuilder { /* fields omitted */ }

Memory options builder.

Implementations

impl MemoryBuilder[src]

pub fn with_min_max_blocks(self, min: i32, max: i32) -> MemoryBuilder[src]

Specify the amount of blocks to keep around.

Memory immediately allocates the max blocks when created.

If the amount of unused allocated blocks reaches min, new block allocation kicks in and allocates up to max blocks again.

Memory blocks returned back to memory can increase count above max, because blocks are not deallocated automatically. Use cleanup function for that.

pub fn with_block_size(self, size: usize) -> MemoryBuilder[src]

Specify the size of a new block.

Make sure it is considerably bigger than any structures you want to keep in it.

pub fn build(self) -> Memory[src]

Auto Trait Implementations

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, 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.