pub trait MessageHandler:
Clone
+ Send
+ Sync {
type Transfer: MessageTransfer;
// Required method
fn process_message<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
message: &'life1 Message,
previous: &'life2 Option<<<Self as MessageHandler>::Transfer as MessageTransfer>::Info>,
sender: &'life3 Sender<Message>,
) -> Pin<Box<dyn Future<Output = BinaryOptionsResult<(Option<MessageType<Self::Transfer>>, bool)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}
Expand description
Every struct that implements MessageHandler will recieve a message and should return
Required Associated Types§
Required Methods§
fn process_message<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
message: &'life1 Message,
previous: &'life2 Option<<<Self as MessageHandler>::Transfer as MessageTransfer>::Info>,
sender: &'life3 Sender<Message>,
) -> Pin<Box<dyn Future<Output = BinaryOptionsResult<(Option<MessageType<Self::Transfer>>, bool)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: '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.