Releases: fero23/bytevec
Releases · fero23/bytevec
bytevec 0.2.0
- Rename the
bytevec_impls
macro tobytevec_decl
. This macro now accepts a pub
access modifier on the declaredstruct
and on its fields. - Reintroduce the
bytevec_impls
macro. 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 thestruct
rather 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 ofByteEncodable
andByteDecodable
now use an integral type parameter
Size
constrained by theBVSize
trait. This trait is implemented foru8
,u16
,u32
andu64
.
This now lifts the 4GB fixed limit of byte buffer, as the user now can useu64
for the size indicator. - Add a
decode_max
method to theByteDecodable
trait, 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.