Skip to main content

SynapseInternal

Trait SynapseInternal 

Source
pub trait SynapseInternal<T, C>
where C: Codec<T> + CodecName + Send + Sync + 'static, T: Send + Sync + 'static,
{ // Required methods fn neuron(&self) -> Arc<dyn Neuron<T, C> + Send + Sync>; fn transduce( &self, payload: Arc<Payload<T, C>>, ) -> Pin<Box<dyn Future<Output = Result<Vec<()>, SynapseError>> + Send + 'static>>; fn transmit( &self, payload: Arc<Payload<T, C>>, ) -> Pin<Box<dyn Future<Output = Result<Vec<()>, SynapseError>> + Send + 'static>>; fn react( &mut self, reactants: Vec<Arc<dyn Reactant<T, C> + Send + Sync>>, error_reactants: Vec<Arc<dyn ErrorReactant<T, C> + Send + Sync>>, ) -> Result<(), SynapseError>; }

Required Methods§

Source

fn neuron(&self) -> Arc<dyn Neuron<T, C> + Send + Sync>

Source

fn transduce( &self, payload: Arc<Payload<T, C>>, ) -> Pin<Box<dyn Future<Output = Result<Vec<()>, SynapseError>> + Send + 'static>>

Source

fn transmit( &self, payload: Arc<Payload<T, C>>, ) -> Pin<Box<dyn Future<Output = Result<Vec<()>, SynapseError>> + Send + 'static>>

Source

fn react( &mut self, reactants: Vec<Arc<dyn Reactant<T, C> + Send + Sync>>, error_reactants: Vec<Arc<dyn ErrorReactant<T, C> + Send + Sync>>, ) -> Result<(), SynapseError>

Implementors§

Source§

impl<T, C> SynapseInternal<T, C> for SynapseInprocess<T, C>
where C: Codec<T> + CodecName + Send + Sync + 'static, T: Sync + Send + 'static,