pub struct SuperCell<T: ?Sized> { /* private fields */ }
Expand description
Modified version of Cell
Implementations§
Source§impl<T, const N: usize> SuperCell<[T; N]>
impl<T, const N: usize> SuperCell<[T; N]>
Sourcepub fn as_array_of_cells(&self) -> &[SuperCell<T>; N]
pub fn as_array_of_cells(&self) -> &[SuperCell<T>; N]
Returns a &[SuperCell<T>; N]
from a &SuperCell<[T; N]>
§Examples
use super_cell::SuperCell;
let mut array: [i32; 3] = [1, 2, 3];
let cell_array: &SuperCell<[i32; 3]> = SuperCell::from_mut(&mut array);
let array_cell: &[SuperCell<i32>; 3] = cell_array.as_array_of_cells();
Trait Implementations§
Source§impl<T: Ord> Ord for SuperCell<T>
impl<T: Ord> Ord for SuperCell<T>
Source§impl<T: PartialOrd> PartialOrd for SuperCell<T>
impl<T: PartialOrd> PartialOrd for SuperCell<T>
impl<T: Eq> Eq for SuperCell<T>
impl<T> Send for SuperCell<T>
impl<T> Sync for SuperCell<T>
Auto Trait Implementations§
impl<T> !Freeze for SuperCell<T>
impl<T> !RefUnwindSafe for SuperCell<T>
impl<T> Unpin for SuperCell<T>
impl<T> UnwindSafe for SuperCell<T>where
T: UnwindSafe + ?Sized,
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