Struct organelle::Axon
[−]
[src]
pub struct Axon<S: Signal, Y: Synapse> { /* fields omitted */ }
provides core convenience functions with little boilerplate
Methods
impl<S: Signal, Y: Synapse> Axon<S, Y>
[src]
fn new(inputs: Vec<Dendrite<Y>>, outputs: Vec<Dendrite<Y>>) -> Result<Self>
[src]
new axon with dendrites and default user-defined state
fn update(&mut self, msg: Impulse<S, Y>) -> Result<Option<Impulse<S, Y>>>
[src]
update the axon's inputs and outputs, then verify dendrites
if axon handles the given message, it consumes it, otherwise it is returned so that the soma can use it.
fn effector(&self) -> Result<&Effector<S, Y>>
[src]
get the effector assigned to this soma
fn send_req_input(&self, dest: Y, msg: S) -> Result<()>
[src]
convenience function for sending messages by role
fn send_req_output(&self, dest: Y, msg: S) -> Result<()>
[src]
convenience function for sending messages by role
fn req_input(&self, role: Y) -> Result<Handle>
[src]
get a RequireOne input
fn var_input(&self, role: Y) -> Result<&Vec<Handle>>
[src]
get a Variadic input
fn req_output(&self, role: Y) -> Result<Handle>
[src]
get a RequireOne output
fn var_output(&self, role: Y) -> Result<&Vec<Handle>>
[src]
get a Variadic output