v0.1002.0
Pre-release
Pre-release
mumbleskates
released this
23 Feb 20:38
·
464 commits
to bilrost
since this release
v0.1002.0
Breaking changes
- Distinguished decoding traits now still succeed without error when decoding
non-canonical data, but additionally return information about the canonicity
of the message. The three levels of canonicity are "Canonical" (the only level
that was accepted previously), "HasExtensions" (all known fields are
canonical, but there are unknown fields), and "NotCanonical" (known fields
have non-canonically represented values). - As part of fixes and expansions to traits and requirements to allow
Message
andDistinguishedMessage
to be object-safe with full functionality,
MessageDyn
andDistinguishedMessageDyn
have been removed.
New features
- The
Canonicity
enum has been introduced at the crate level, returned as
additional information by distinguished decoding traits. - Since distinguished encoders now return
Result<Canonicity, DecodeError>
orResult<(T, Canonicity), DecodeError>
, new helper traits have been added
to allow converting this information into errors when it is
unacceptable:WithCanonicity
andRequireCanonicity
.
Fixes
- Object-safe traits were broken and unfun to use. They've been implemented in a
much more correct way now. - Derived Enumeration types now convert via
TryFrom<u32, Error = u32>
instead
ofError = DecodeError
. The old implementation wasn't really helping anyone
by discarding the untranslated value.
Cleanups
- Significant readme expansion and organization.