Trait organelle::Soma [] [src]

pub trait Soma: Sized {
    type Synapse: Synapse;
    type Error: Error + Send + Into<Error>;
    fn update(
        self,
        imp: Impulse<Self::Synapse>
    ) -> Box<Future<Item = Self, Error = Self::Error>>; fn probe(
        self,
        _settings: Settings
    ) -> Box<Future<Item = <Result<(Self, SomaData), Self::Error> as IsResult>::Ok, Error = <Result<(Self, SomaData), Self::Error> as IsResult>::Err>>
    where
        Self: 'static
, { ... }
fn run(
        self,
        handle: Handle
    ) -> Box<Future<Item = <Result<()> as IsResult>::Ok, Error = <Result<()> as IsResult>::Err>>
    where
        Self: 'static
, { ... } }

a singular cell of functionality that can be ported between organelles

you can think of a soma as a stream of impulses folded over a structure. somas will perform some type of update upon receiving an impulse, which can then propagate to other somas. when stitched together inside an organelle, this can essentially be used to easily solve any asynchronous programming problem in an efficient, modular, and scalable way.

Associated Types

the synapse a synapse plays in a connection between somas.

the types of errors that this soma can return

Required Methods

react to a single impulse

Provided Methods

probe the internal structure of this soma

convert this soma into a future that can be passed to an event loop

Implementors