pub trait ImplUnMarshal: ImplCommandMsg {
// Required method
fn unmarshal(raw: &[u8]) -> Result<Self, MarshalerError>;
}Expand description
Payload deserialization half of Marshaler.
Automatically implemented for any type that implements Marshaler.
Implement this trait directly — without implementing Marshaler —
to create a decode-only type that does not support serialization.
Used as the bound on Messager::unmarshal and RawFrame::unmarshal.
Required Methods§
Sourcefn unmarshal(raw: &[u8]) -> Result<Self, MarshalerError>
fn unmarshal(raw: &[u8]) -> Result<Self, MarshalerError>
See Marshaler::unmarshal for details.
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.