pub struct AliasableBox<T: ?Sized>(/* private fields */);
Expand description
Basic aliasable (non core::ptr::Unique
) alternative to
alloc::boxed::Box
.
Implementations§
Source§impl<T: ?Sized> AliasableBox<T>
impl<T: ?Sized> AliasableBox<T>
Sourcepub fn from_unique(ptr: UniqueBox<T>) -> Self
pub fn from_unique(ptr: UniqueBox<T>) -> Self
Construct an AliasableBox
from a UniqueBox
.
Sourcepub fn into_unique(ptr: AliasableBox<T>) -> UniqueBox<T>
pub fn into_unique(ptr: AliasableBox<T>) -> UniqueBox<T>
Consumes self
and converts it into a non-aliasable UniqueBox
.
Sourcepub fn into_unique_pin(pin: Pin<AliasableBox<T>>) -> Pin<UniqueBox<T>>
pub fn into_unique_pin(pin: Pin<AliasableBox<T>>) -> Pin<UniqueBox<T>>
Convert a pinned AliasableBox
to a core::ptr::Unique
backed pinned
UniqueBox
.
Sourcepub fn from_unique_pin(pin: Pin<UniqueBox<T>>) -> Pin<AliasableBox<T>>
pub fn from_unique_pin(pin: Pin<UniqueBox<T>>) -> Pin<AliasableBox<T>>
Convert a pinned core::ptr::Unique
backed UniqueBox
to a
pinned AliasableBox
.
Trait Implementations§
Source§impl<T: ?Sized> AsMut<T> for AliasableBox<T>
impl<T: ?Sized> AsMut<T> for AliasableBox<T>
Source§impl<T: ?Sized> AsRef<T> for AliasableBox<T>
impl<T: ?Sized> AsRef<T> for AliasableBox<T>
Source§impl<T> Debug for AliasableBox<T>
impl<T> Debug for AliasableBox<T>
Source§impl<T: ?Sized> Deref for AliasableBox<T>
impl<T: ?Sized> Deref for AliasableBox<T>
Source§impl<T: ?Sized> DerefMut for AliasableBox<T>
impl<T: ?Sized> DerefMut for AliasableBox<T>
Source§impl<T: ?Sized> Drop for AliasableBox<T>
impl<T: ?Sized> Drop for AliasableBox<T>
impl<T: ?Sized> AliasableDeref for AliasableBox<T>
impl<T> Send for AliasableBox<T>
impl<T: ?Sized> StableDeref for AliasableBox<T>
impl<T> Sync for AliasableBox<T>
Auto Trait Implementations§
impl<T> Freeze for AliasableBox<T>where
T: ?Sized,
impl<T> RefUnwindSafe for AliasableBox<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Unpin for AliasableBox<T>where
T: ?Sized,
impl<T> UnwindSafe for AliasableBox<T>where
T: RefUnwindSafe + ?Sized,
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
Source§impl<T> IntoAliasable for Twhere
T: AliasableDeref,
impl<T> IntoAliasable for Twhere
T: AliasableDeref,
Source§fn into_aliasable(self) -> <T as IntoAliasable>::Target
fn into_aliasable(self) -> <T as IntoAliasable>::Target
Convert into an aliasable pointer type.