Enum organelle::Impulse
[−]
[src]
pub enum Impulse<R: Synapse> { AddDendrite(Uuid, R, R::Dendrite), AddTerminal(Uuid, R, R::Terminal), Start(Uuid, Sender<Impulse<R>>, Handle), Stop, Error(Error), Probe(Settings, Sender<SomaData>), }
a group of control signals passed between somas
Variants
AddDendrite(Uuid, R, R::Dendrite)
add a dendrite for input to the soma
you should always expect to handle this impulse if the soma has any inputs. if your soma has inputs, it is best to wrap it with an Axon which can be used for validation purposes.
AddTerminal(Uuid, R, R::Terminal)
add a terminal for output to the soma
you should always expect to handle this impulse if the soma has any outputs. if your soma has outputs, it is best to wrap it with an Axon which can be used for validation purposes.
Start(Uuid, Sender<Impulse<R>>, Handle)
notify the soma that it has received all of its inputs and outputs
you should always expect to handle this impulse because it will be passed to each soma regardless of configuration
Stop
stop the event loop and exit gracefully
you should not expect to handle this impulse at any time, it is handled for you by the event loop
Error(Error)
terminate the event loop with an error
this impulse will automatically be triggered if a soma update resolves with an error.
you should not expect to handle this impulse at any time, it is handled for you by the event loop
Probe(Settings, Sender<SomaData>)
send a probe throughout the organelle
Methods
impl<R> Impulse<R> where
R: Synapse,
[src]
R: Synapse,
pub fn convert_from<T>(imp: Impulse<T>) -> Self where
T: Synapse + Into<R>,
T::Dendrite: Into<R::Dendrite>,
T::Terminal: Into<R::Terminal>,
[src]
T: Synapse + Into<R>,
T::Dendrite: Into<R::Dendrite>,
T::Terminal: Into<R::Terminal>,
convert from another type of impulse