Struct slice_pool::SlicePool
[−]
[src]
pub struct SlicePool<T>(_);
A thread-safe interface for allocating chunks in an owned slice.
Methods
impl<T> SlicePool<T>
[src]
fn new<Data: Sliceable<T> + 'static>(data: Data) -> Self
Takes ownership of a slice with a chunkable interface
fn allocate(&mut self, size: usize) -> Option<PoolVal<T>>
Allocates a new chunk in the slice.
fn as_ptr(&self) -> *const T
Returns the pointer to the underlying slice.
fn len(&self) -> usize
Returns the size of the underlying slice.