pub trait ErrorReactant<T, C>: Send + Sync{
// Required methods
fn react_error(
&self,
error: Arc<ReactantError>,
payload: Arc<Payload<T, C>>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'static>>;
fn erase_error(
self: Box<Self>,
) -> Arc<dyn ErrorReactantErased + Send + Sync + 'static>;
// Provided method
fn new_erased_error(
self,
) -> Arc<dyn ErrorReactantErased + Send + Sync + 'static>
where Self: Sized + 'static { ... }
}Required Methods§
fn react_error( &self, error: Arc<ReactantError>, payload: Arc<Payload<T, C>>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'static>>
fn erase_error( self: Box<Self>, ) -> Arc<dyn ErrorReactantErased + Send + Sync + 'static>
Provided Methods§
Sourcefn new_erased_error(
self,
) -> Arc<dyn ErrorReactantErased + Send + Sync + 'static>where
Self: Sized + 'static,
fn new_erased_error(
self,
) -> Arc<dyn ErrorReactantErased + Send + Sync + 'static>where
Self: Sized + 'static,
Helper to consume this error reactant and return an erased Arc.