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
type Synapse: Synapse
the synapse a synapse plays in a connection between somas.
type Error: Error + Send + Into<Error>
the types of errors that this soma can return
Required Methods
fn update(
self,
imp: Impulse<Self::Synapse>
) -> Box<Future<Item = Self, Error = Self::Error>>
self,
imp: Impulse<Self::Synapse>
) -> Box<Future<Item = Self, Error = Self::Error>>
react to a single impulse
Provided Methods
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,
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,
probe the internal structure of this soma
fn run(
self,
handle: Handle
) -> Box<Future<Item = <Result<()> as IsResult>::Ok, Error = <Result<()> as IsResult>::Err>> where
Self: 'static,
self,
handle: Handle
) -> Box<Future<Item = <Result<()> as IsResult>::Ok, Error = <Result<()> as IsResult>::Err>> where
Self: 'static,
convert this soma into a future that can be passed to an event loop