pub struct CopyCell<T> { /* private fields */ }
Expand description
This should be identical to the Cell
implementation in the standard
library, but always require that the internal type implements Copy
and implements Copy
itself.
Implementations§
Trait Implementations§
impl<T: Copy> Copy for CopyCell<T>
impl<T: Eq> Eq for CopyCell<T>
impl<T> Send for CopyCell<T>
Sync
is unsafe due to mutability, however Send
is totally fine!
impl<T> StructuralPartialEq for CopyCell<T>
Auto Trait Implementations§
impl<T> Freeze for CopyCell<T>where
T: Freeze,
impl<T> RefUnwindSafe for CopyCell<T>where
T: RefUnwindSafe,
impl<T> !Sync for CopyCell<T>
impl<T> Unpin for CopyCell<T>where
T: Unpin,
impl<T> UnwindSafe for CopyCell<T>where
T: UnwindSafe + 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