pub struct Block {
pub ptr: BlockPointer,
pub size: BlockSize,
}Fields§
§ptr: BlockPointer§size: BlockSizeImplementations§
source§impl Block
impl Block
sourcepub fn new(size: BlockSize) -> Result<Self, BlockError>
pub fn new(size: BlockSize) -> Result<Self, BlockError>
create new memory block.
§Errors
This function will return an error if [size] is not a power of two or cannot allocate memory
pub fn as_ptr(&self) -> *const u8
pub fn dealloc_block(ptr: BlockPointer, size: BlockSize)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Block
impl RefUnwindSafe for Block
impl !Send for Block
impl !Sync for Block
impl Unpin for Block
impl UnwindSafe for Block
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