Trait binary_sv2::Deserialize [−][src]
pub trait Deserialize<'a> {
fn get_structure(data: &[u8]) -> Result<Vec<FieldMarker, Global>, Error>;
fn from_decoded_fields(
data: Vec<DecodableField<'a>, Global>
) -> Result<Self, Error>;
fn from_bytes(data: &'a mut [u8]) -> Result<Self, Error> { ... }
fn from_reader(reader: &mut impl Read) -> Result<Self, Error> { ... }
}Expand description
Implmented by all the decodable structure, it can be derived for every structure composed only by primitives or other Decodable.
Required methods
fn get_structure(data: &[u8]) -> Result<Vec<FieldMarker, Global>, Error>fn from_decoded_fields(
data: Vec<DecodableField<'a>, Global>
) -> Result<Self, Error>Provided methods
fn from_reader(reader: &mut impl Read) -> Result<Self, Error>