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(HandleHandle, 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

initializes a cell with an effector to use

add an input Handle with connection role

add an output Handle with connection role

notifies cell that organelle has begun execution

internal use only - used to track source and destination of message

updates the cell with a user-defined message from source cell Handle

tells the organelle to stop executing

stop the organelle because of an error