Skip to main content

SynapseExternal

Trait SynapseExternal 

Source
pub trait SynapseExternal<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<PayloadRaw<T, C>>, ) -> impl Future<Output = Result<(Vec<()>, Vec<()>), SynapseError>> + Send + 'static; fn transmit( &self, payload: Arc<PayloadRaw<T, C>>, ) -> impl Future<Output = Result<(Vec<()>, Vec<()>), SynapseError>> + Send + 'static; fn react( &mut self, reactants: Vec<Arc<dyn Reactant<T, C> + Send + Sync>>, raw_reactants: Vec<Arc<dyn ReactantRaw<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<PayloadRaw<T, C>>, ) -> impl Future<Output = Result<(Vec<()>, Vec<()>), SynapseError>> + Send + 'static

Source

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

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, C, S> SynapseExternal<T, C> for BackpressureExternalSynapse<T, C, S>
where C: Codec<T> + CodecName + Send + Sync + 'static, T: Send + Sync + 'static, S: SynapseExternal<T, C> + Send + Sync + 'static,