serde-big-array-options 0.1.1

Allow to serialize/deserialize [Option<T>;N]
Documentation
  • Coverage
  • 0%
    0 out of 3 items documented0 out of 2 items with examples
  • Size
  • Source code size: 4.57 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.22 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 19s Average build duration of successful builds.
  • all releases: 19s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • nbittich/serde-big-array-options
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • nbittich

serde-big-array-options

Simpler alternative to serde_with. If you need something more than [Option<T>;N], use that instead.

Usage

const DECK_SIZE:usize = 52;

#[derive(Debug, Copy, Clone, Serialize, Deserialize)]
pub struct Game {
    #[serde(
        serialize_with = "serde_big_array_options::serialize",
        deserialize_with = "serde_big_array_options::deserialize"
    )]
    pub back_in_deck: [Option<usize>; DECK_SIZE],
}