Struct organelle::Effector
[−]
[src]
pub struct Effector<S: Signal, Y: Synapse> { /* fields omitted */ }
the effector is a soma's method of communicating between other somas
the effector can send a message to any destination, provided you have its handle. it will route these messages asynchronously to their destination, so communication can be tricky, however, this is truly the best way I've found to compose efficient, scalable systems.
Methods
impl<S: Signal, Y: Synapse> Effector<S, Y>
[src]
fn this_soma(&self) -> Handle
[src]
get the Handle associated with the soma that owns this effector
fn send(&self, dest: Handle, msg: S)
[src]
send a message to dest soma
fn send_in_order(&self, dest: Handle, msgs: Vec<S>)
[src]
send a batch of messages in order to dest soma
fn stop(&self)
[src]
stop the organelle
fn error(&self, e: Error)
[src]
stop the organelle because of an error
fn spawn<F>(&self, future: F) where
F: Future<Item = (), Error = ()> + 'static,
[src]
F: Future<Item = (), Error = ()> + 'static,
spawn a future on the reactor
fn reactor(&self) -> Handle
[src]
get a reactor handle
fn remote(&self) -> RemoteEffector<S> where
S: Send,
[src]
S: Send,
get a remote effector for use across threads