serde-intern

Crates.ioserde-intern
lib.rsserde-intern
version1.0.0
sourcesrc
created_at2024-08-08 01:33:56.896278
updated_at2024-08-08 01:33:56.896278
descriptionA Serde addon that allows interning of strings and byte sequences behind `Arc`s during deserialization.
homepage
repositoryhttps://github.com/listochkin/serde-intern
max_upload_size
id1328947
size26,417
Andrei Listochkin (Андрей Листочкин) (listochkin)

documentation

README

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.

Commit count: 0

cargo fmt