Skip to content

Improvements in serde and async

Compare
Choose a tag to compare
@Mingun Mingun released this 13 Mar 15:13
· 403 commits to master since this release

What's Changed

New Features

  • #541: (De)serialize specially named $text enum variant in externally tagged
    enums to / from textual content
  • #556: to_writer and to_string now accept ?Sized types
  • #556: Add new to_writer_with_root and to_string_with_root helper functions
  • #520: Add methods BytesText::inplace_trim_start and BytesText::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 into Writter::get_mut
  • #568: Add method Writter::get_ref
  • #569: Rewrite the Reader::read_event_into_async as an async fn, making the future Send if possible.
  • #571: Borrow element names (<element>) when deserialize with serde.
    This change allow to deserialize into HashMap<&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 where T is some
    sequence type (for example, Vec or tuple)
  • #540: Fix a compilation error (probably a rustc bug) in some circumstances.
    Serializer::new and Serializer::with_root now accepts only references to Writer.
  • #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 by DeEvent::Text with merged content.
    The same behavior for the Reader 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

Full Changelog: v0.27.1...v0.28.0