Trait toad_msg::TryFromBytes
source · pub trait TryFromBytes<A: AsRef<[u8]>>: Sized {
type Error;
// Required method
fn try_from_bytes(bytes: A) -> Result<Self, Self::Error>;
}
Expand description
Trait for converting a sequence of bytes into some data structure
Required Associated Types§
Required Methods§
sourcefn try_from_bytes(bytes: A) -> Result<Self, Self::Error>
fn try_from_bytes(bytes: A) -> Result<Self, Self::Error>
Try to convert from some sequence of bytes T
into Self