Trait rubble::bytes::FromBytes[][src]

pub trait FromBytes<'a>: Sized {
    fn from_bytes(bytes: &mut ByteReader<'a>) -> Result<Self, Error>;
}
Expand description

Trait for decoding values from a byte slice.

Required methods

Decode a Self from a byte slice, advancing bytes to point past the data that was read.

If bytes contains data not valid for the target type, or contains an insufficient number of bytes, an error will be returned and the state of bytes is unspecified (it can point to arbitrary data).

Implementors