Skip to main content

LHeap

Struct LHeap 

Source
pub struct LHeap;
Expand description

Live heap that performs actual memory operations.

Implementations§

Source§

impl LHeap

Source

pub const fn new() -> Self

Create a new live heap.

Trait Implementations§

Source§

impl Debug for LHeap

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for LHeap

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl IHeap<&'static Shape> for LHeap

Source§

type Ptr = *mut u8

Pointer type used by this heap.
Source§

unsafe fn alloc(&mut self, shape: &'static Shape) -> *mut u8

Allocate a region for a value of the given shape. Read more
Source§

unsafe fn dealloc(&mut self, ptr: *mut u8, shape: &'static Shape)

Deallocate a region. Read more
Source§

unsafe fn memcpy(&mut self, dst: *mut u8, src: *mut u8, len: usize)

Copy len bytes from src to dst. Read more
Source§

unsafe fn drop_in_place(&mut self, ptr: *mut u8, shape: &'static Shape)

Drop the value at ptr and mark the range as uninitialized. Read more
Source§

unsafe fn default_in_place( &mut self, ptr: *mut u8, shape: &'static Shape, ) -> bool

Default-initialize the value at ptr and mark the range as initialized. Read more

Auto Trait Implementations§

§

impl Freeze for LHeap

§

impl RefUnwindSafe for LHeap

§

impl Send for LHeap

§

impl Sync for LHeap

§

impl Unpin for LHeap

§

impl UnsafeUnpin for LHeap

§

impl UnwindSafe for LHeap

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> IShapeExtra for T

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.