Skip to main content

Module dedup

Module dedup 

Source
Expand description

Deduplication of repeated values in the serialized output.

Note that the deduplication scheme is order-dependent: it relies on the fact that serialization and deserialization traverse the value in the same order.

Structs§

DedupId
Identifies a deduplicated value amongst the values of its type within a single serialized output. Ids are allocated in the order in which we serialize the values.
DedupSerializer
Deduplicate the values of each type, in one table per type.
DeserializeTableMapper 🔒
SerializeTableMapper 🔒

Enums§

SerDedup
How we represent a deduplicated value in the serialized output. T is the serialized form of the value.

Traits§

Dedup
A value that we deduplicate in the serialized output. We identify values by equality, hence the bounds.
DedupSerializerState
The state threaded through (de)serialization to deduplicate values. Use () to serialize values normally and DedupSerializer to deduplicate them.

Functions§

deserialize_dedup
Deserialize a value that may have been deduplicated. build reconstructs the value from its serialized form.
serialize_dedup
Serialize value, deduplicating it if the state says so. repr is the serialized form of value, only used the first time we meet it.
stateless_deserialize_error
The error we report when a deduplicated value is deserialized with serde’s stateless Deserialize impl, which can’t resolve the ids.