Struct mnemos_alloc::containers::Box
source · pub struct Box<T> {
inner: Box<T>,
}
Expand description
A wrapper of alloc::boxed::Box<T>
Fields§
§inner: Box<T>
Implementations§
source§impl<T> Box<T>
impl<T> Box<T>
sourcepub async fn new(t: T) -> Self
pub async fn new(t: T) -> Self
Attempt to allocate a new owned T.
Will not complete until the allocation succeeds.
sourcepub fn try_new(t: T) -> Result<Self, T>
pub fn try_new(t: T) -> Result<Self, T>
Attempt to allocate a new owned T.
Returns an error containing the provided value if the allocation could not immediately succeed.
sourcepub fn into_alloc_box(self) -> Box<T>
pub fn into_alloc_box(self) -> Box<T>
Convert to a regular old alloc box
Trait Implementations§
impl<T: Send> Send for Box<T>
impl<T: Sync> Sync for Box<T>
Auto Trait Implementations§
impl<T> Freeze for Box<T>
impl<T> RefUnwindSafe for Box<T>where
T: RefUnwindSafe,
impl<T> Unpin for Box<T>
impl<T> UnwindSafe for Box<T>where
T: UnwindSafe,
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