serde-intern 1.0.0

A Serde addon that allows interning of strings and byte sequences behind `Arc`s during deserialization.
Documentation
  • Coverage
  • 100%
    4 out of 4 items documented1 out of 4 items with examples
  • Size
  • Source code size: 28.82 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.38 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 21s Average build duration of successful builds.
  • all releases: 21s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • listochkin

serde-intern

A Serde addon that allows interning of strings and byte sequences behind Arcs during deserialization.

Serde comes with an "rc" feature flag already. However:

Deserializing a data structure containing reference-counted pointers will not attempt to deduplicate references to the same data. Every deserialized pointer will end up with a strong count of 1.

Unlike the stock Rc / Arc deserialization available in the main Serde crate, these custom deserializer functions will find duplicate values and instead of wrapping each of them into an individual Arc it will reuse the existing arcs.

See API documentation for more information.

License

Licensed under either of BSD-2-Clause Plus Patent License, or Apache License, Version 2.0, or MIT license at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in serde-intern by you, as defined in the Apache-2.0 license, shall be multi-licensed as above, without any additional terms or conditions.