pub struct MemoryPoolOptions {
pub chunk_size: usize,
pub chunk_num_prealloc: usize,
pub slice_max_size: usize,
}Expand description
Options to create a memory pool.
Fields§
§chunk_size: usizeThe amount of bytes used for each chunk in the memory pool.
chunk_num_prealloc: usizeThe number of chunks allocated directly at creation.
Useful when you know in advance how much memory you’ll need.
slice_max_size: usizeThe max size in bytes a slice can take in the pool.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MemoryPoolOptions
impl RefUnwindSafe for MemoryPoolOptions
impl Send for MemoryPoolOptions
impl Sync for MemoryPoolOptions
impl Unpin for MemoryPoolOptions
impl UnwindSafe for MemoryPoolOptions
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more