Enum organelle::Protocol
[−]
[src]
pub enum Protocol<M, R> where
M: CellMessage,
R: CellRole, { Init(Effector<M, R>), AddInput(Handle, R), AddOutput(Handle, R), Start, Payload(Handle, Handle, M), Message(Handle, M), Stop, Err(Error), }
a set of protocol messages to be relayed throughout the network
wraps a user-defined message within the organelle protocol. 1. a cell is always updated with Init first. 2. as the organelle is built, the cell will be updated with any inputs or outputs specified using AddInput and AddOutput. 3. when the organelle is ready to begin execution, every cell is updated with Start 4. any messages sent between cells will come through Message 5. when a cell determines that the organelle should stop, it can issue Stop and the organelle will exit its event loop.
Variants
Init(Effector<M, R>)
initializes a cell with an effector to use
AddInput(Handle, R)
add an input Handle with connection role
AddOutput(Handle, R)
add an output Handle with connection role
Start
notifies cell that organelle has begun execution
Payload(Handle, Handle, M)
internal use only - used to track source and destination of message
Message(Handle, M)
updates the cell with a user-defined message from source cell Handle
Stop
tells the organelle to stop executing
Err(Error)
stop the organelle because of an error