This crate provides a Rust-idiomatic re-implementation of the "listpack" data-structure implemented in Redis as a part of Redis.
This implementation is:
- fully written in Rust.
- Allows to specify a custom allocator.
- Allows to store more types than in Redis:
f64
,u64
,bool
,null
and objects of custom type.
Please follow the official description of the data structure first.
In order to implement the additional types, the unused data subencodings are used.
The MSRV
is 1.70
.
Simply build using cargo
:
cargo build
Please take a look at the /examples directory, where you may find a few examples showing the use of the crate.
Additionally, you may check out the unit tests /src/listpack.rs directory to get familiar with some more specific use-cases.