pub struct EmptyBox<T> { /* private fields */ }
Expand description
An “emptied” Box
. Constructed via EmptyBox::take()
, an EmptyBox<T>
is
a Box
from which the contents have been moved. This allows for reuse of the
Box
via EmptyBox::put()
, which moves the contents back in, turning the
EmptyBox
back into a Box<T>
.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for EmptyBox<T>
impl<T> RefUnwindSafe for EmptyBox<T>where
T: RefUnwindSafe,
impl<T> !Send for EmptyBox<T>
impl<T> !Sync for EmptyBox<T>
impl<T> Unpin for EmptyBox<T>
impl<T> UnwindSafe for EmptyBox<T>where
T: RefUnwindSafe,
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