Struct stable_fs::storage::allocator::ChunkPtrAllocator
source · pub struct ChunkPtrAllocator<M: Memory> { /* private fields */ }Implementations§
source§impl<M: Memory> ChunkPtrAllocator<M>
impl<M: Memory> ChunkPtrAllocator<M>
pub fn new( v2_available_chunks: VirtualMemory<M>, ) -> Result<ChunkPtrAllocator<M>, Error>
pub fn set_chunk_size(&mut self, new_size: usize) -> Result<(), Error>
pub fn chunk_size(&self) -> usize
pub fn allocate(&mut self) -> FileChunkPtr
pub fn free(&mut self, ptr: FileChunkPtr)
Auto Trait Implementations§
impl<M> Freeze for ChunkPtrAllocator<M>
impl<M> !RefUnwindSafe for ChunkPtrAllocator<M>
impl<M> !Send for ChunkPtrAllocator<M>
impl<M> !Sync for ChunkPtrAllocator<M>
impl<M> Unpin for ChunkPtrAllocator<M>
impl<M> !UnwindSafe for ChunkPtrAllocator<M>
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