Deserializer::deserialize_identifier()
now deserializesToken::Bytes
along withToken::Str
andToken::Field
.
PartialEq
implementation forTokens
now avoids unnecessary iterator cloning when checking againstUnordered
Token
s.- Lowered MSRV to
1.56.0
. - Deserializing
Str
andBytes
as owned now reuses the existing allocation.
Tokens
now implementsIntoIterator<Item = Token>
.- The
token
module is now public, containing bothToken
(which is also exposed in the root module) andTokens
. - Comparison with nested
Token::Unordered
s is now allowed and correctly handled. token::IntoIter
type for iterating over theTokens
struct
.
Deserializer::build()
now takes the tokens as a parameter. These tokens can now be any type that implementsIntoIterator<Item = Token>
.Tokens
is no longer exposed in the root module, instead being available attoken::Tokens
.- The internals of
Tokens
are no longer public.Tokens
can no longer be constructed by user code, and is now only returned by theSerializer
. - Comparison with a
Tokens
can now be done with any type that implementsIntoIterator<Item = &Token>
. de::Builder::build()
now only requires&self
instead of&mut self
.Error::ExpectedToken
variant has been replaced byError::ExpectedSeqEnd
,Error::ExpectedTupleEnd
,Error::ExpectedTupleStructEnd
,Error::ExpectedTupleVariantEnd
,Error::ExpectedMapEnd
,Error::ExpectedStructEnd
, andError::ExpectedStructVariantEnd
variants.
From<Token>
implementation forserde::de::Unexpected
.PartialEq
implementation forToken
.Display
implementation forToken
.- Dependency on
hashbrown
crate.
- Increased version of
hashbrown
dependency to0.14.2
. - Raised MSRV to
1.63.0
.
Deserializer
can now be configured to allow (or disallow) zero-copy deserialization.
ser::Error
now implementsPartialEq
andEq
.
Deserializer
now defaults to settingself_describing
tofalse
.
SerializeStructAs
enum
and accompanyingBuilder::serialize_struct_as()
method for specifying whetherstruct
s should be serialized asserde
struct or sequence types.SerializeStruct
type to provide a more specializedserde::SerializeStruct
implementation.
Deserializer::deserialize_struct
can now interpret bothStruct
andSeq
Token
s.
CompoundSerializer
no longer implementsserde::SerializeStruct
.
Token
andTokens
for representing serialized values.Serializer
,ser::Builder
,ser::Error
, andser::CompoundSerializer
for testing serialization.Deserializer
,de::Builder
, andde::Error
for testing deserialization.