pub struct CellElem<T>where
T: Copy + PartialEq,{
pub cell: Cell<T>,
}
Expand description
Cell is much cheaper than RefCell, used to store basic types
Fields§
§cell: Cell<T>
Implementations§
source§impl<T> CellElem<T>where
T: Copy + PartialEq,
impl<T> CellElem<T>where T: Copy + PartialEq,
pub fn into_inner(self) -> T
pub fn slice_into_inner<U>(inner_slice: &[Self]) -> &[U]
pub fn slice_into_inner_mut<U>(inner_slice: &mut [Self]) -> &mut [U]
pub fn slice_ref_into_inner<U>(inner_slice: Ref<'_, [Self]>) -> Ref<'_, [U]>
pub fn slice_ref_into_inner_mut<U>( inner_slice: RefMut<'_, [Self]> ) -> RefMut<'_, [U]>
Trait Implementations§
source§impl<T> Ord for CellElem<T>where
T: Copy + PartialEq + Ord,
impl<T> Ord for CellElem<T>where T: Copy + PartialEq + Ord,
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T> PartialEq<CellElem<T>> for CellElem<T>where
T: Copy + PartialEq + PartialEq,
impl<T> PartialEq<CellElem<T>> for CellElem<T>where T: Copy + PartialEq + PartialEq,
source§impl<T> PartialOrd<CellElem<T>> for CellElem<T>where
T: Copy + PartialEq + PartialOrd,
impl<T> PartialOrd<CellElem<T>> for CellElem<T>where T: Copy + PartialEq + PartialOrd,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T> Eq for CellElem<T>where T: Copy + PartialEq + Eq,
impl<T> StructuralEq for CellElem<T>where T: Copy + PartialEq,
impl<T> StructuralPartialEq for CellElem<T>where T: Copy + PartialEq,
Auto Trait Implementations§
impl<T> !RefUnwindSafe for CellElem<T>
impl<T> Send for CellElem<T>where T: Send,
impl<T> !Sync for CellElem<T>
impl<T> Unpin for CellElem<T>where T: Unpin,
impl<T> UnwindSafe for CellElem<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