pub struct Box<'m, T>{ /* private fields */ }
Expand description
A box that uses the provided memory to store dynamic objects.
Implementations§
Source§impl<'m, T> Box<'m, T>
impl<'m, T> Box<'m, T>
Sourcepub fn new<Value>(mem: &'m mut [u8], value: Value) -> Selfwhere
Value: Unsize<T>,
pub fn new<Value>(mem: &'m mut [u8], value: Value) -> Selfwhere
Value: Unsize<T>,
Places a value
into the specified mem
buffer. The user should provide enough memory
to store the value with its metadata considering alignment requirements.
§Panics
- If the provided buffer is insufficient to store the value.
Trait Implementations§
Auto Trait Implementations§
impl<'m, T> Freeze for Box<'m, T>where
T: ?Sized,
impl<'m, T> RefUnwindSafe for Box<'m, T>where
T: RefUnwindSafe + ?Sized,
impl<'m, T> Send for Box<'m, T>
impl<'m, T> Sync for Box<'m, T>
impl<'m, T> Unpin for Box<'m, T>
impl<'m, T> !UnwindSafe for Box<'m, 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