[−][src]Struct memur::MemoryBuilder
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
impl RefUnwindSafe for MemoryBuilder
impl Send for MemoryBuilder
impl Sync for MemoryBuilder
impl Unpin for MemoryBuilder
impl UnwindSafe for MemoryBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,