Struct mnemos_alloc::containers::HeapArc
source · pub struct HeapArc<T> {
pub(crate) ptr: NonNull<Active<ArcInner<T>>>,
pub(crate) pd: PhantomData<Active<ArcInner<T>>>,
}
Fields§
§ptr: NonNull<Active<ArcInner<T>>>
§pd: PhantomData<Active<ArcInner<T>>>
Implementations§
source§impl<T> HeapArc<T>
impl<T> HeapArc<T>
sourcepub fn leak(self) -> NonNull<T>
pub fn leak(self) -> NonNull<T>
Leak the contents of this box, never to be recovered (probably)
sourcepub unsafe fn clone_from_leaked(ptr: NonNull<T>) -> Self
pub unsafe fn clone_from_leaked(ptr: NonNull<T>) -> Self
Create a clone of a given leaked HeapArc<T>
. DOES increase the refcount.
sourcepub unsafe fn from_leaked(ptr: NonNull<T>) -> Self
pub unsafe fn from_leaked(ptr: NonNull<T>) -> Self
Re-takes ownership of a leaked HeapArc<T>
. Does NOT increase the refcount.
pub unsafe fn increment_count(ptr: NonNull<T>)
Trait Implementations§
impl<T: Send + Sync> Send for HeapArc<T>
impl<T: Send + Sync> Sync for HeapArc<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for HeapArc<T>
impl<T> Unpin for HeapArc<T>where T: Unpin,
impl<T> !UnwindSafe for HeapArc<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