pub trait OnEventMessage {
type Event: Debug + Send + Sync;
type Error: Error + Send + Sync + 'static;
// Required methods
fn parse_message<'life0, 'life1, 'async_trait, T>(
&'life0 self,
msg: &'life1 Message,
data: Option<Arc<T>>,
) -> Pin<Box<dyn Future<Output = Result<Self::Event, Self::Error>> + Send + 'async_trait>>
where T: 'async_trait + Any + Send + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn on_message<'life0, 'life1, 'async_trait, T>(
&'life0 self,
event: &'life1 Self::Event,
data: Option<Arc<T>>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where T: 'async_trait + Any + Send + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Required Associated Types§
Required Methods§
fn parse_message<'life0, 'life1, 'async_trait, T>( &'life0 self, msg: &'life1 Message, data: Option<Arc<T>>, ) -> Pin<Box<dyn Future<Output = Result<Self::Event, Self::Error>> + Send + 'async_trait>>
fn on_message<'life0, 'life1, 'async_trait, T>( &'life0 self, event: &'life1 Self::Event, data: Option<Arc<T>>, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
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.