All Versions
14
Latest Version
Avg Release Cycle
18 days
Latest Release
25 days ago

Changelog History
Page 1

  • v1.0.102

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

    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

    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

    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.

  • v1.0.98

    July 28, 2019
    • ➕ Add support for NonZeroI* types (#1589, thanks @Flaise)
  • v1.0.97

    July 17, 2019

    Introduce serde(try_from = "...") attribute to derive Deserialize based on a given implementation of std::convert::TryFrom (#1526, thanks @fanzeyi)

    #[derive(Deserialize)] #[serde(try\_from = "u32")]enum N { Zero, One, Two, }impl TryFrom\<u32\> for N { type Error = String; fn try\_from(u: u32) -\> Result\<Self, Self::Error\> { match u { 0 =\> Ok(Self::Zero), 1 =\> Ok(Self::One), 2 =\> Ok(Self::Two), other =\> Err(format!("out of range: {}", other)), } } }
    
  • v1.0.96

    July 17, 2019
    • 🔀 Implement serialization and deserialization for std::sync::atomic types (#1572 and #1581, thanks @Roguelazer)
    • 👉 Make "alloc" feature work on stable Rust 1.36+ (#1576, thanks @c410-f3r)
  • v1.0.95

    July 16, 2019

    yanked

  • v1.0.94

    June 27, 2019
    • Accept enums in input data when deserializing IgnoredAny (#1558)
  • v1.0.93

    June 27, 2019
    • 👍 Allow integer keys in untagged flattened map (#1545)