Function mesh_channel::cell::cell
source ยท pub fn cell<T: MeshField + Sync + Clone>(value: T) -> (CellUpdater<T>, Cell<T>)
Expand description
Creates a new cell and its associated updater.
Both the cell and the updater can be sent to remote processes via mesh channels.
let (mut updater, cell) = cell::<u32>(5);
assert_eq!(cell.get(), 5);
block_on(updater.set(6));
assert_eq!(cell.get(), 6);