pub struct MaybeBox<T> {
inner: Box<T>,
}Expand description
Box-like type providing opportunistic heap allocation when the alloc feature is available
that falls back to stack allocation when it’s unavailable.
Fields§
§inner: Box<T>Implementations§
Trait Implementations§
impl<T> StructuralPartialEq for MaybeBox<T>
Auto Trait Implementations§
impl<T> Freeze for MaybeBox<T>
impl<T> RefUnwindSafe for MaybeBox<T>where
T: RefUnwindSafe,
impl<T> Send for MaybeBox<T>where
T: Send,
impl<T> Sync for MaybeBox<T>where
T: Sync,
impl<T> Unpin for MaybeBox<T>
impl<T> UnsafeUnpin for MaybeBox<T>
impl<T> UnwindSafe for MaybeBox<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