9 breaking releases

new 0.11.0 Dec 4, 2024
0.10.0 Nov 7, 2024
0.9.0 Oct 8, 2024
0.5.0 Feb 19, 2024
0.1.1 Jul 9, 2023

#469 in Encoding

Download history 141/week @ 2024-08-19 17/week @ 2024-08-26 184/week @ 2024-09-16 8/week @ 2024-09-23 33/week @ 2024-09-30 173/week @ 2024-10-07 13/week @ 2024-10-14 5/week @ 2024-10-21 114/week @ 2024-11-04 8/week @ 2024-11-11 11/week @ 2024-11-18 158/week @ 2024-12-02

184 downloads per month
Used in 4 crates

Apache-2.0

220KB
5.5K SLoC

tuple_key

A serialization format for lexicographically sorted tuples. The keys have the property that any TypedTupleKey that implements lexicographically sorted Ord, PartialOrd traits in field declaration order will serialize to a valid byte string that sorts in the same way.

Status

Active development. This library has seen recent changes to match the types of keys supported by protobuf maps. Version 0.4 reset the serialization in backwards-incompatible ways.

Scope

This crate provides everything necessary to convert a struct to and from a tuple key.

Warts

  • The documentation is lacking.

Documentation

The latest documentation is always available at docs.rs.

Updating

  • 0.2.0 -> 0.3.0: Add schema support. Changed the encoding format in a backwards-incompatible way.
  • 0.1.1 -> 0.2.0: Added support for empty tuples in named structs. Backwards-compatible otherwise.

Dependencies

~1.5MB
~40K SLoC