[−][src]Trait dioptre::ext::CellExt
Additional methods for Cell
.
Associated Types
type Inner
Required methods
fn project<T>(&self, field: Field<Self::Inner, T>) -> &Cell<T>
Access a field of a Cell
.
use core::cell::Cell; use dioptre::{Fields, ext::CellExt}; #[derive(Fields)] struct Data { x: i32, y: i32, } fn process(data: &Cell<Data>) { data.project(Data::x).set(3); data.project(Data::y).set(5); }