Enum organelle::Impulse [] [src]

pub enum Impulse<S: Signal, Y: Synapse> {
    Init(Effector<S, Y>),
    AddInput(Handle, Y),
    AddOutput(Handle, Y),
    Start,
    Payload(HandleHandle, 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

initializes a soma with an effector to use

add an input Handle with connection role

add an output Handle with connection role

notifies soma that organelle has begun execution

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

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

tells the organelle to stop executing

stop the organelle because of an error