Skip to main content

Reactant

Trait Reactant 

Source
pub trait Reactant<T, C>
where C: Codec<T> + CodecName + Send + Sync + 'static, T: Send + Sync + 'static, Self: Send + Sync,
{ // Required methods fn react( &self, payload: Arc<Payload<T, C>>, ) -> Pin<Box<dyn Future<Output = Result<(), ReactantError>> + Send + 'static>>; fn erase(self: Box<Self>) -> Arc<dyn ReactantErased + Send + Sync + 'static>; // Provided method fn new_erased(self) -> Arc<dyn ReactantErased + Send + Sync + 'static> where Self: Sized + 'static { ... } }

Required Methods§

Source

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

Source

fn erase(self: Box<Self>) -> Arc<dyn ReactantErased + Send + Sync + 'static>

Provided Methods§

Source

fn new_erased(self) -> Arc<dyn ReactantErased + Send + Sync + 'static>
where Self: Sized + 'static,

Helper to consume this reactant and return an erased Arc.

Implementors§

Source§

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

Source§

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