pub trait Handler {
// Required method
fn handle_message(
&self,
message: NetworkMessage,
) -> impl Future<Output = Result<NetworkMessage>> + Send;
}Expand description
Handler Implement this trait as part of the handling logic for incoming network messages This is meant to be used as a “middleware” for the node to consume and create functionality
Required Methods§
fn handle_message( &self, message: NetworkMessage, ) -> impl Future<Output = Result<NetworkMessage>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".