pub trait Reactant<T, C>{
// 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§
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 Methods§
Sourcefn new_erased(self) -> Arc<dyn ReactantErased + Send + Sync + 'static>where
Self: Sized + 'static,
fn new_erased(self) -> Arc<dyn ReactantErased + Send + Sync + 'static>where
Self: Sized + 'static,
Helper to consume this reactant and return an erased Arc.