Trait organelle::Cell
[−]
[src]
pub trait Cell: Sized { type Message: CellMessage; type Role: CellRole; fn update(self, _msg: Protocol<Self::Message, Self::Role>) -> Result<Self> { ... } fn run(self) -> Result<()> { ... } }
defines an interface for a cell of any type
generic across the user-defined message to be passed between cells and the user-defined roles for connections
Associated Types
type Message: CellMessage
user-defined message to be passed between cells
type Role: CellRole
user-defined roles for connections
Provided Methods
fn update(self, _msg: Protocol<Self::Message, Self::Role>) -> Result<Self>
apply any changes to the cell's state as a result of _msg
fn run(self) -> Result<()>
spin up an event loop and run cell