Improvements in serde and async
What's Changed
New Features
- #541: (De)serialize specially named
$text
enum variant in externally tagged
enums to / from textual content - #556:
to_writer
andto_string
now accept?Sized
types - #556: Add new
to_writer_with_root
andto_string_with_root
helper functions - #520: Add methods
BytesText::inplace_trim_start
andBytesText::inplace_trim_end
to trim leading and trailing spaces from text events - #565: Allow deserialize special field names
$value
and$text
into borrowed
fields when use serde deserializer - #568: Rename
Writter::inner
intoWritter::get_mut
- #568: Add method
Writter::get_ref
- #569: Rewrite the
Reader::read_event_into_async
as an async fn, making the futureSend
if possible. - #571: Borrow element names (
<element>
) when deserialize with serde.
This change allow to deserialize intoHashMap<&str, T>
, for example - #573: Add basic support for async byte writers via tokio's
AsyncWrite
.
Bug Fixes
- #537: Restore ability to deserialize attributes that represents XML namespace
mappings (xmlns:xxx
) that was broken since #490 - #510: Fix an error of deserialization of
Option<T>
fields whereT
is some
sequence type (for example,Vec
or tuple) - #540: Fix a compilation error (probably a rustc bug) in some circumstances.
Serializer::new
andSerializer::with_root
now accepts only references toWrite
r. - #520: Merge consequent (delimited only by comments and processing instructions)
texts and CDATA when deserialize using serde deserializer.DeEvent::Text
and
DeEvent::CData
events was replaced byDeEvent::Text
with merged content.
The same behavior for theReader
does not implemented (yet?) and should be
implemented manually - #562: Correctly set minimum required version of memchr dependency to 2.1
- #565: Correctly set minimum required version of tokio dependency to 1.10
- #565: Fix compilation error when build with serde <1.0.139
New Contributors
- @emarsden made their first contribution in #535
- @dacut made their first contribution in #494
- @silvergasp made their first contribution in #554
- @dburgener made their first contribution in #562
- @martsokha made their first contribution in #568
- @vilunov made their first contribution in #569
Full Changelog: v0.27.1...v0.28.0