pub struct LeanAlloc;Expand description
A global allocator that uses Lean’s allocator. This is useful when
writing FFI libraries for Lean, where people may want to disable rust’s std.
ⓘ
#![no_std]
#[global_allocator]
static ALLOC : lean_sys::alloc::LeanAlloc = lean_sys::alloc::LeanAlloc;Trait Implementations§
Source§impl GlobalAlloc for LeanAlloc
impl GlobalAlloc for LeanAlloc
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 LeanAlloc
impl RefUnwindSafe for LeanAlloc
impl Send for LeanAlloc
impl Sync for LeanAlloc
impl Unpin for LeanAlloc
impl UnwindSafe for LeanAlloc
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