5 releases

0.0.5 Apr 23, 2021
0.0.4 Jan 23, 2021
0.0.3 Jan 3, 2021
0.0.2 Jan 3, 2021
0.0.1 Jan 3, 2021

#37 in #sled

MIT/Apache

19KB
416 lines

prost-sled: An integration layer between prost and sled

prost-sled makes it easy to use sled to store structure data (protobufs) encoded using prost. It just abstracts away the boilerplate of having to encode and decode them.

Usage

prost-sled provides a wrapper around sled::Db: ProtoDb. This provides methods of the same name as those on sled::Db except they work using structs that implement prost::Message (the trait used by prost for protobuf messages).

The From and Into traits are implemented both ways between sled::Db and ProtoDb so it's really easy to convert between the two as needed.

License

Licensed under either of

at your option.

Contribution

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

Dependencies

~2.4–4.5MB
~77K SLoC