pub struct Cleanup { /* private fields */ }Expand description
Cleanup helper used to deallocate blocks of canonical ABI data from lowerings.
Implementations§
Source§impl Cleanup
impl Cleanup
Sourcepub fn new(layout: Layout) -> (*mut u8, Option<Cleanup>)
pub fn new(layout: Layout) -> (*mut u8, Option<Cleanup>)
Allocates a chunk of memory with layout and returns an object to clean
it up.
Always returns a pointer which is null if layout has size zero. The
optional cleanup returned will be present if layout has a non-zero
size. When dropped Cleanup will deallocate the pointer returned.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cleanup
impl RefUnwindSafe for Cleanup
impl Unpin for Cleanup
impl UnwindSafe for Cleanup
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