Trait organelle::Soma [] [src]

pub trait Soma: Sized {
    type Signal: Signal;
    type Synapse: Synapse;
    type Error: Error + Send + From<Error> + 'static;
    fn update(
        self,
        _msg: Impulse<Self::Signal, Self::Synapse>
    ) -> Result<Self, Self::Error> { ... }
fn into_future(
        self,
        reactor: Handle
    ) -> Box<Future<Item = Result<()>, Error = Error>>
    where
        Self: 'static
, { ... }
fn run(self) -> Result<()>
    where
        Self: 'static
, { ... } }

defines an interface for a soma of any type

generic across the user-defined message to be passed between somas and the user-defined roles for connections

Associated Types

user-defined message to be passed between somas

user-defined roles for connections

error when a soma fails to update

Provided Methods

apply any changes to the soma's state as a result of _msg

convert the soma into a future that can be run on an event loop

spin up an event loop and run soma

Implementors