pub trait FromMessage<A: Adapter, M = ViaRequest>: Sized {
type Error: Error + 'static;
// Required method
fn from_message(
s: Arc<Socket<A>>,
v: Value,
ack_id: Option<i64>,
) -> Result<Self, Self::Error>;
}
Expand description
A trait used to extract and consume arguments from the message event.
The Result
associated type is used to return an error if the extraction fails, in this case the handler is not called.
Required Associated Types§
Required Methods§
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.