v0.1001.0
Pre-release
Pre-release
mumbleskates
released this
23 Feb 20:37
·
525 commits
to bilrost
since this release
v0.1001.0
Breaking changes
- Changed the name of the
detailed-errors
feature to have a hyphen instead of
an underscore, consistent with the other feature names. - Renamed the
vecblob
encoder toplainbytes
. - Encoded bilrost values and semantics no longer rely on the
Default
implementation for their empty values.Message
no longer requires, nor does its derive macro provide, an
implementation ofDefault
.Enumeration
no longer cares whether the type has aDefault
implementation, only whether there is a variant whose Bilrost value is
exactly0
.- All of the above duties are taken on by the
HasEmptyState
trait, as does
the base implementation forNewForOverwrite
.
- Following on that, renamed the
HasEmptyState
trait toEmptyState
. - Usability fixes for
Blob
:new(..)
has been changed to create an empty
Blob
with no arguments, and the functionality for wrapping a vec has been
renamed tofrom_vec(..)
. - Added APIs for
replace_from(..)
etc. to the regular non-dynMessage
traits, which is useful for messages with ignored fields but requires those
same APIs in theMessageDyn
andDistinguishedMessageDyn
traits to be
renamed toreplace_from_dyn(..)
etc.
New features
- Added features that enable support of
smallvec
,thin-vec
, andtinyvec
. - Added support for
u16
andi16
with thegeneral
encoder, and added a
newvarint
encoder that supports all the varint types in addition tou8
andi8
.general
will not support one-byte integers, because this makes it
too easy to accidentally spell a completely unintended encoding ofVec<u8>
;
encodings for collections of bytes like this will remain explicit. - Added support for
[u8; N]
with theplainbytes
encoder, which only accepts
values of the correct length. - Added support for
[u8; 4]
and[u8; 8]
with thefixed
encoder. - Added support for marking message fields with
#[bilrost(ignore)]
, which
causes the field to be excluded from encoding and decoding but precludes
distinguished decoding. - Added
replace_from_slice(&[u8])
andreplace_distinguished_from_slice(&[u8])
to theMessageDyn
andDistinguishedMessageDyn
traits. - Changed value-decoding to pass down whether or not an empty value is allowed,
allowing implementations to err sooner and cheaper by detecting that the
encoded data is that which represents the empty value, rather than always
checking the value for emptiness after the fact.
Fixes
- Require the
serde_json/float_roundtrip
feature for
thebilrost-types/serde_json
compatibility. If that feature is desired to be
disabled, theserde_json
feature inbilrost-types
currently only provides
from/into anyway and those can be written elsewhere.
Cleanups
- Deduplicated implementations of
Encoder
andDistinguishedEncoder
that
blanket all implementations for which those encoders support value-encoding. - Great strides in expanding and cleaning up the documentation.