Enum organelle::Impulse
[−]
[src]
pub enum Impulse<S: Signal, Y: Synapse> { Init(Effector<S, Y>), AddInput(Handle, Y), AddOutput(Handle, Y), Start, Payload(Handle, Handle, S), Signal(Handle, S), 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 soma is always updated with Init first. 2. as the organelle is built, the soma will be updated with any inputs or outputs specified using AddInput and AddOutput. 3. when the organelle is ready to begin execution, every soma is updated with Start 4. any messages sent between somas will come through Signal 5. when a soma determines that the organelle should stop, it can issue Stop and the organelle will exit its event loop.
Variants
Init(Effector<S, Y>)
initializes a soma with an effector to use
AddInput(Handle, Y)
add an input Handle with connection role
AddOutput(Handle, Y)
add an output Handle with connection role
Start
notifies soma that organelle has begun execution
Payload(Handle, Handle, S)
internal use only - used to track source and destination of message
Signal(Handle, S)
updates the soma with a user-defined message from source soma Handle
Stop
tells the organelle to stop executing
Err(Error)
stop the organelle because of an error