pub trait FromMessageParts<A: Adapter>: Sized {
type Error: Error + 'static;
// Required method
fn from_message_parts(
s: &Arc<Socket<A>>,
v: &mut Value,
ack_id: &Option<i64>,
) -> Result<Self, Self::Error>;
}Expand description
A trait used to extract 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".
Implementors§
Source§impl<A: Adapter, T: Clone + Send + Sync + 'static> FromMessageParts<A> for Extension<T>
Available on crate feature extensions only.
impl<A: Adapter, T: Clone + Send + Sync + 'static> FromMessageParts<A> for Extension<T>
Available on crate feature
extensions only.type Error = ExtensionNotFound<T>
Source§impl<A: Adapter, T: Clone + Send + Sync + 'static> FromMessageParts<A> for HttpExtension<T>
impl<A: Adapter, T: Clone + Send + Sync + 'static> FromMessageParts<A> for HttpExtension<T>
type Error = ExtensionNotFound<T>
Source§impl<A: Adapter, T: Clone + Send + Sync + 'static> FromMessageParts<A> for MaybeExtension<T>
Available on crate feature extensions only.
impl<A: Adapter, T: Clone + Send + Sync + 'static> FromMessageParts<A> for MaybeExtension<T>
Available on crate feature
extensions only.type Error = Infallible
Source§impl<A: Adapter, T: Clone + Send + Sync + 'static> FromMessageParts<A> for MaybeHttpExtension<T>
impl<A: Adapter, T: Clone + Send + Sync + 'static> FromMessageParts<A> for MaybeHttpExtension<T>
type Error = Infallible
Source§impl<A: Adapter, T: Clone + Send + Sync + 'static> FromMessageParts<A> for State<T>
Available on crate feature state only.
impl<A: Adapter, T: Clone + Send + Sync + 'static> FromMessageParts<A> for State<T>
Available on crate feature
state only.