Struct organelle::Organelle
[−]
[src]
pub struct Organelle<T: Soma> where
T: Soma, { /* fields omitted */ }
a soma designed to facilitate connections between other somas
where somas are the single cells of functionality, organelles are the organisms capable of more complex tasks. however, organelles are still essentially somas, so they can used in larger organelles as long as they comply with their standards.
Methods
impl<T: Soma + 'static> Organelle<T>
[src]
pub fn new(main: T, handle: Handle) -> Self
[src]
create a new organelle
pub fn nucleus(&self) -> Uuid
[src]
get the main soma's uuid
pub fn add_soma<U: Soma + 'static>(&mut self, soma: U) -> Uuid where
U::Synapse: From<T::Synapse> + Into<T::Synapse>,
<U::Synapse as Synapse>::Dendrite: From<<T::Synapse as Synapse>::Dendrite> + Into<<T::Synapse as Synapse>::Dendrite>,
<U::Synapse as Synapse>::Terminal: From<<T::Synapse as Synapse>::Terminal> + Into<<T::Synapse as Synapse>::Terminal>,
[src]
U::Synapse: From<T::Synapse> + Into<T::Synapse>,
<U::Synapse as Synapse>::Dendrite: From<<T::Synapse as Synapse>::Dendrite> + Into<<T::Synapse as Synapse>::Dendrite>,
<U::Synapse as Synapse>::Terminal: From<<T::Synapse as Synapse>::Terminal> + Into<<T::Synapse as Synapse>::Terminal>,
add a soma to the organelle
pub fn connect(
&self,
dendrite: Uuid,
terminal: Uuid,
synapse: T::Synapse
) -> Result<()>
[src]
&self,
dendrite: Uuid,
terminal: Uuid,
synapse: T::Synapse
) -> Result<()>
connect two somas together using the specified synapse
pub fn add_dendrite(
&self,
dendrite: (Uuid, <T::Synapse as Synapse>::Dendrite),
terminal: Uuid,
synapse: T::Synapse
) -> Result<()>
[src]
&self,
dendrite: (Uuid, <T::Synapse as Synapse>::Dendrite),
terminal: Uuid,
synapse: T::Synapse
) -> Result<()>
send a dendrite to the specified soma
pub fn add_terminal(
&self,
terminal: (Uuid, <T::Synapse as Synapse>::Terminal),
dendrite: Uuid,
synapse: T::Synapse
) -> Result<()>
[src]
&self,
terminal: (Uuid, <T::Synapse as Synapse>::Terminal),
dendrite: Uuid,
synapse: T::Synapse
) -> Result<()>
send a terminal to the specified soma
Trait Implementations
impl<T: Soma + 'static> Soma for Organelle<T>
[src]
type Synapse = T::Synapse
the synapse a synapse plays in a connection between somas.
type Error = Error
the types of errors that this soma can return
fn probe(
self,
settings: Settings
) -> Box<Future<Item = <Result<(Self, SomaData)> as IsResult>::Ok, Error = <Result<(Self, SomaData)> as IsResult>::Err>>
[src]
self,
settings: Settings
) -> Box<Future<Item = <Result<(Self, SomaData)> as IsResult>::Ok, Error = <Result<(Self, SomaData)> as IsResult>::Err>>
probe the internal structure of this soma
fn update(
self,
imp: Impulse<T::Synapse>
) -> Box<Future<Item = <Result<Self> as IsResult>::Ok, Error = <Result<Self> as IsResult>::Err>>
[src]
self,
imp: Impulse<T::Synapse>
) -> Box<Future<Item = <Result<Self> as IsResult>::Ok, Error = <Result<Self> as IsResult>::Err>>
react to a single impulse
fn run(
self,
handle: Handle
) -> Box<Future<Item = <Result<()> as IsResult>::Ok, Error = <Result<()> as IsResult>::Err>> where
Self: 'static,
[src]
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