jamesmunns / postcard

A no_std + serde compatible message library for Rust
Apache License 2.0
943 stars 91 forks source link

Make fixints usable through serde field attributes instead of wrappers #69

Closed lachlansneff-parallel closed 2 years ago

lachlansneff-parallel commented 2 years ago

This changes the (thankfully not public, by shear accident), fixint module to be usable through the #[serde(with = ...)] field attribute instead of wrappers.

For example:

#[derive(Serialize, Deserialize)]
pub struct DefinitelyBE {
    #[serde(with = "crate::fixint::be")]
    x: u16,
}
netlify[bot] commented 2 years ago

Deploy Preview for cute-starship-2d9c9b canceled.

Name Link
Latest commit 7ee1e184cd544fdc08d839827bf63b4e0b95c26c
Latest deploy log https://app.netlify.com/sites/cute-starship-2d9c9b/deploys/62d1af45395be80008305b2a
jamesmunns commented 2 years ago

Awesome, thanks @lachlansneff-parallel!