Enums§
- Decode
Error DecodeError
wraps the error that occurred during during- Decode
Order DecodeOrder
is used to specify how signed and unsigned integers encoded as bytes must be assumed w.r.t byte-order for decoding. ExampleDecodeOrder::Little
assumes all the bytes to be decoded are in little endian byte order.- Decode
Type DecodeType
enum can be used to tell the decoder who a sequence of bytes at a given offset must be decoded back. Example:DecodeType::Uint16
can be used to tell the decoder to interpret the next two bytes asuint16
.- Decoded
Data DecodedData
enum is used to wrap the decoded content into one of the supported data-type. Example:DecodedData::Str("hello")
, contains the stringhello
decoded back from the encoded bytes.
Functions§
- decode_
packed decode_packed
function decoded a given byte-array into list of required values specified intypes
parameter. Returns the list of decoded valuesVec<DecodedData>
orDecodeError
.