pub struct EnifAlloc;Expand description
A GlobalAlloc backed by the BEAM allocator (enif_alloc/enif_free).
Install it in the final NIF cdylib with enif_global_allocator!, or by
hand: #[global_allocator] static A: EnifAlloc = EnifAlloc;.
Trait Implementations§
Source§impl GlobalAlloc for EnifAlloc
impl GlobalAlloc for EnifAlloc
Source§unsafe fn alloc(&self, layout: Layout) -> *mut u8
unsafe fn alloc(&self, layout: Layout) -> *mut u8
Allocates memory as described by the given
layout. Read moreAuto Trait Implementations§
impl Freeze for EnifAlloc
impl RefUnwindSafe for EnifAlloc
impl Send for EnifAlloc
impl Sync for EnifAlloc
impl Unpin for EnifAlloc
impl UnsafeUnpin for EnifAlloc
impl UnwindSafe for EnifAlloc
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