Releases: fero23/bytevec
Releases · fero23/bytevec
bytevec 0.2.0
- Rename the
bytevec_implsmacro tobytevec_decl. This macro now accepts a pub
access modifier on the declaredstructand on its fields. - Reintroduce the
bytevec_implsmacro. This macro now can do a partial or full implementation
of the serialization and deserialization operations for an externally declaredstruct. Partial
implementation in this context meaning that it can be implemented for only a subset of the
actual fields of thestructrather than for all the fields. The remaining fields will be
obtained from the value returned from [Default::default()] on deserialization. - Change the fixed u32 type for the size indicators used in the byte representation of a complex
structure. The methods ofByteEncodableandByteDecodablenow use an integral type parameter
Sizeconstrained by theBVSizetrait. This trait is implemented foru8,u16,u32andu64.
This now lifts the 4GB fixed limit of byte buffer, as the user now can useu64for the size indicator. - Add a
decode_maxmethod to theByteDecodabletrait, so users are now able to set a limit to the
length of byte buffer on deserialization. If the limit is less or equal than the buffer length, it will
call and return the value returned fromdecode, otherwise it will return aBadSizeDecodeError. - Change endianness from big endian to little endian.