pub struct SmallBox<T: ?Sized, const STACK_SIZE: usize> { /* private fields */ }
Expand description
A [Box
] analogue that will attempt to allocate to the stack with heap fallback
Implementations§
Trait Implementations§
impl<T: ?Sized + Unsize<U>, U: ?Sized, const STACK_SIZE: usize> CoerceUnsized<SmallBox<U, STACK_SIZE>> for SmallBox<T, STACK_SIZE>
Auto Trait Implementations§
impl<T, const STACK_SIZE: usize> Freeze for SmallBox<T, STACK_SIZE>where
T: ?Sized,
impl<T, const STACK_SIZE: usize> RefUnwindSafe for SmallBox<T, STACK_SIZE>where
T: RefUnwindSafe + ?Sized,
impl<T, const STACK_SIZE: usize> !Send for SmallBox<T, STACK_SIZE>
impl<T, const STACK_SIZE: usize> !Sync for SmallBox<T, STACK_SIZE>
impl<T, const STACK_SIZE: usize> Unpin for SmallBox<T, STACK_SIZE>where
T: ?Sized,
impl<T, const STACK_SIZE: usize> UnwindSafe for SmallBox<T, STACK_SIZE>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