All Versions
30
Latest Version
Avg Release Cycle
22 days
Latest Release
1209 days ago

Changelog History
Page 2

  • v1.0.108 Changes

    May 10, 2020

    Provide a Serializer impl that can write primitives and unit variants to a &mut fmt::Formatter (#1705, thanks @jethrogb)

    use serde::Serialize;use std::fmt::{self, Display}; #[derive(Serialize)] #[serde(rename\_all = "kebab-case")]pub enum MessageType { StartRequest, EndRequest, }impl Display for MessageType { fn fmt(&self, f: &mut fmt::Formatter) -\> fmt::Result { self.serialize(f) } }
    
  • v1.0.107 Changes

    May 08, 2020
    • ๐Ÿ›  Fix panic during macro expansion when using serde(skip) and serde(other) in the same enum (#1804)
  • v1.0.106 Changes

    April 03, 2020
    • Hide dummy const implementation detail from rustdoc when documenting a binary crate (#1768, thanks @robo9k)
  • v1.0.105 Changes

    March 18, 2020
    • ๐Ÿ‘ Allow #[serde(borrow)] to work on non-standard Cow types (#1754, thanks @maciejhirsz)
  • v1.0.104 Changes

    December 16, 2019
    • โช Revert stabilization of Serialize/Deserialize impls for ! to account for rust-lang/rust#67224
  • v1.0.103 Changes

    November 25, 2019
    • ๐Ÿ‘Œ Support deserializing untagged unit variants from formats that treat unit as None (#1668)
  • v1.0.102 Changes

    October 27, 2019
    • ๐Ÿ‘Œ Support deserializing PathBuf from bytes like &Path already did, and support deserializing Box<Path> (#1656, thanks @heftig)
  • v1.0.101 Changes

    September 16, 2019

    Report errors on malformed serde attributes, like #[serde(rename =)] -- the compiler used to reject these itself, but when the compiler relaxed its requirements on attribute syntax these malformed attributes began silently being ignored by serde_derive

    โš  Eliminate unused variable warning when using skip_serializing inside a tuple variant of an adjacently tagged enum (#1617, thanks @arilotter)

    ๐Ÿ‘Œ Support skip attribute inside of newtype variants (#1622, thanks @Xaeroxe)

  • v1.0.100 Changes

    September 08, 2019

    Provide serde::ser::StdError and serde::de::StdError which are either a re-export of std::error::Error (if Serde's "std" feature is enabled) or a new identical trait (otherwise).

    #[cfg(feature = "std")]pub use std::error::Error as StdError; #[cfg(not(feature = "std"))]pub trait StdError: Debug + Display { fn source(&self) -\> Option\<&(StdError + 'static)\> { None } }
    

    ๐Ÿ‘ Serde's error traits serde::ser::Error and serde::de::Error require std::error::Error as a supertrait, but only when Serde is built with "std" enabled. Data formats that don't care about no_std support should generally provide their error types with a std::error::Error impl directly:

    #[derive(Debug)]struct MySerError {...}impl serde::ser::Error for MySerError {...}impl std::fmt::Display for MySerError {...}// We don't support no\_std!impl std::error::Error for MySerError {}
    

    Data formats that do support no_std may either have a "std" feature of their own as has been required in the past:

    [features]std = ["serde/std"]
    
    #[cfg(feature = "std")]impl std::error::Error for MySerError {}
    

    ... or else now may provide the std Error impl unconditionally via Serde's re-export:

    impl serde::ser::StdError for MySerError {}
    
  • v1.0.99 Changes

    August 16, 2019

    โšก๏ธ Update Syn dependency to 1.0.

    Note: This raises the minimum required compiler version for serde_derive from rustc 1.15 to rustc 1.31. The minimum required compiler version for serde remains at rustc 1.13.