pub struct ArrayBox<'a, T: ?Sized + 'a, B: Buf> { /* private fields */ }Expand description
A stack-allocated container that can store dynamically sized types.
Implementations§
source§impl<'a, T: ?Sized + 'a, B: Buf> ArrayBox<'a, T, B>
impl<'a, T: ?Sized + 'a, B: Buf> ArrayBox<'a, T, B>
sourcepub const fn new<S: Unsize<T>>(source: S) -> Selfwhere
B: Buf + ConstDefault,
pub const fn new<S: Unsize<T>>(source: S) -> Selfwhere
B: Buf + ConstDefault,
Allocates memory on stack and then places source into it as DST T.
sourcepub fn as_mut_ptr(&mut self) -> *mut T
pub fn as_mut_ptr(&mut self) -> *mut T
Return raw mutable pointer to the stored object.
Trait Implementations§
source§impl<'a, T: ?Sized + 'a, B: Buf> BorrowMut<T> for ArrayBox<'a, T, B>
impl<'a, T: ?Sized + 'a, B: Buf> BorrowMut<T> for ArrayBox<'a, T, B>
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Auto Trait Implementations§
impl<'a, T: ?Sized, B> RefUnwindSafe for ArrayBox<'a, T, B>
impl<'a, T: ?Sized, B> Send for ArrayBox<'a, T, B>
impl<'a, T: ?Sized, B> Sync for ArrayBox<'a, T, B>
impl<'a, T: ?Sized, B> Unpin for ArrayBox<'a, T, B>where
B: Unpin,
impl<'a, T: ?Sized, B> UnwindSafe for ArrayBox<'a, T, B>
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