[−][src]Function packs::structure::decode_struct
pub fn decode_struct<S: PackableStruct, T: Read>(
tag_byte: u8,
reader: &mut T
) -> Result<S, DecodeError>
Tries to read a PackStream struct with provided tag byte. Checks for the number of fields as well as the read tag byte and fails, if at least one does not match.