pub struct DBox<'a, T> { /* private fields */ }Expand description
DBox is a smart pointer designed to work with the DHeap allocator.
It provides similar functionality to Box in the Rust standard library but is specifically tailored for use with the dense heap implementation (DHeap).
Implementations§
Source§impl<'a, T> DBox<'a, T>
impl<'a, T> DBox<'a, T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes the DBox and retrieves the inner value T.
This function replaces the DBox’s memory cell with a Moved state, indicating
that the memory has been moved out of the DHeap before the DBox is dropped.
After replacing the cell, it returns the inner value of the DBox.
§Returns
- The inner value
Tcontained within theDBox.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for DBox<'a, T>
impl<'a, T> !RefUnwindSafe for DBox<'a, T>
impl<'a, T> !Send for DBox<'a, T>
impl<'a, T> !Sync for DBox<'a, T>
impl<'a, T> Unpin for DBox<'a, T>where
T: Unpin,
impl<'a, T> !UnwindSafe for DBox<'a, T>
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