pub struct InlinableBox<T>(/* private fields */);
Expand description
A simple inlinable box that automatically inlines if
a type’s size and alignment are less than or equal
to that of usize
.
Implementations§
Source§impl<T> InlinableBox<T>
impl<T> InlinableBox<T>
pub fn new(item: T) -> InlinableBox<T>
pub fn take(self) -> T
Trait Implementations§
Source§impl<T: Clone> Clone for InlinableBox<T>
impl<T: Clone> Clone for InlinableBox<T>
Source§impl<T: Debug> Debug for InlinableBox<T>
impl<T: Debug> Debug for InlinableBox<T>
Source§impl<T> Deref for InlinableBox<T>
impl<T> Deref for InlinableBox<T>
Source§impl<T> DerefMut for InlinableBox<T>
impl<T> DerefMut for InlinableBox<T>
Auto Trait Implementations§
impl<T> Freeze for InlinableBox<T>
impl<T> RefUnwindSafe for InlinableBox<T>where
T: RefUnwindSafe,
impl<T> Send for InlinableBox<T>where
T: Send,
impl<T> Sync for InlinableBox<T>where
T: Sync,
impl<T> Unpin for InlinableBox<T>where
T: Unpin,
impl<T> UnwindSafe for InlinableBox<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