#[repr(transparent)]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
sourceimpl<T: PartialEq> PartialEq<CopyCell<T>> for CopyCell<T>
impl<T: PartialEq> PartialEq<CopyCell<T>> for CopyCell<T>
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> StructuralEq for CopyCell<T>
impl<T> StructuralPartialEq for CopyCell<T>
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more