[][src]Trait splinter::network::dispatch::FromMessageBytes

pub trait FromMessageBytes: Any + Sized {
    fn from_message_bytes(message_bytes: &[u8]) -> Result<Self, DispatchError>;
}

Converts bytes into a concrete message instance

Required methods

fn from_message_bytes(message_bytes: &[u8]) -> Result<Self, DispatchError>

Converts the given bytes into the target type

Errors

Any issues that occur during deserialization will result in a DispatchError.

Loading content...

Implementors

impl FromMessageBytes for RawBytes[src]

impl<M> FromMessageBytes for M where
    M: Message + Sized
[src]

Loading content...