Struct organelle::Organelle [] [src]

pub struct Organelle<S: Soma + 'static> { /* fields omitted */ }

a special soma designed to contain a network of interconnected somas

the organelle is created with one soma. this soma is the only soma within the organelle that is allowed to communicate or connect to the outside world. it acts as an entry point for the network, providing essential external data while keeping implementation-specific data and somas hidden. upon receiving an update, it has the opportunity to communicate these updates with external somas.

the intent is to allow organelles to be hierarchical and potentially contain any number of nested soma networks. in order to do this, the organelle isolates a group of messages from the larger whole. this is essential for extensibility and maintainability.

any organelle can be plugged into any other organelle provided their messages and dendrites can convert between each other using From and Into

Methods

impl<S: Soma + 'static> Organelle<S>
[src]

[src]

create a new organelle with input and output somas

[src]

add a new soma to the organelle and initialize it

as long as the soma's message type can convert Into and From the organelle's message type, it can be added to the organelle and can communicate with any somas that do the same.

[src]

connect input to output and update them accordingly

[src]

get the main soma's handle

Trait Implementations

impl<S: Soma> Soma for Organelle<S>
[src]

user-defined message to be passed between somas

user-defined roles for connections

error when a soma fails to update

[src]

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

[src]

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

[src]

spin up an event loop and run soma