Struct rlifesrc_lib::cells::CellRef
source · #[repr(transparent)]pub struct CellRef<R: Rule> {
cell: NonNull<LifeCell<R>>,
}
Expand description
A reference to a LifeCell
. It is just a wrapped NonNull
pointer.
Safety
This type is just a wrapped raw pointer. Dereferring a CellRef
should
follow the same guarantees for dereferring a raw mut pointer.
Furthermore, a CellRef
referring to a cell in one world should never be
used in any function or method involving another world.
Fields§
§cell: NonNull<LifeCell<R>>
The LifeCell
it refers to.
Implementations§
Methods from Deref<Target = LifeCell<R>>§
sourcepub(crate) fn update_desc(&self, state: State, new: bool)
pub(crate) fn update_desc(&self, state: State, new: bool)
Updates the neighborhood descriptors of all neighbors and the predecessor when the state of one cell is changed.
Here state
is the new state of the cell when new
is true,
the old state when new
is false.
Trait Implementations§
source§impl<R: Rule> PartialEq for CellRef<R>
impl<R: Rule> PartialEq for CellRef<R>
impl<R: Rule> Copy for CellRef<R>
impl<R: Rule> Eq for CellRef<R>
Auto Trait Implementations§
impl<R> !RefUnwindSafe for CellRef<R>
impl<R> !Send for CellRef<R>
impl<R> !Sync for CellRef<R>
impl<R> Unpin for CellRef<R>
impl<R> !UnwindSafe for CellRef<R>
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