Struct slice_pool::SlicePoolRef
[−]
[src]
pub struct SlicePoolRef<'a, T: 'a>(_);
An interface for allocating chunks in a referenced slice.
Methods
impl<'a, T> SlicePoolRef<'a, T>
[src]
fn new(slice: &'a mut [T]) -> Self
Wraps a slice with a chunkable interface.
fn allocate(&mut self, size: usize) -> Option<PoolRef<'a, 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.