pub struct Allocated { /* private fields */ }Implementations§
Source§impl Allocated
impl Allocated
pub const fn get_padding(alignment: usize) -> usize
pub fn get_layout_for_allocation(size: usize, alignment: usize) -> Layout
pub fn from_layout(pointer: *mut u8, layout: &Layout) -> Option<Self>
Sourcepub unsafe fn from_user_pointer(user_pointer: *mut u8) -> Option<Self>
pub unsafe fn from_user_pointer(user_pointer: *mut u8) -> Option<Self>
§Safety
The provided user pointer must have been obtained from a previous allocation that stored a CompactLayout before the user pointer.
pub fn get_layout(&self) -> Option<Layout>
pub fn erase_layout(&self)
pub fn set_layout(&self, layout: &Layout)
pub fn get_base_pointer(&self) -> *mut u8
pub fn get_user_pointer(&self) -> *mut u8
Auto Trait Implementations§
impl Freeze for Allocated
impl RefUnwindSafe for Allocated
impl !Send for Allocated
impl !Sync for Allocated
impl Unpin for Allocated
impl UnwindSafe for Allocated
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