redis-serde
serde serialization and deserialization of redis-rs values
About
This crate is a fork of OneSignal/serde-redis with full serialization support added.
Status
- ✅ Deserialization: Fully implemented and working
- ✅ Serialization: Fully implemented and working
Summary
This crate provides automatic serialization and deserialization of values for use with redis-rs.
Deserialization
use RedisDeserialize;
let s: Simple = redis.hgetall?
.deserialize?;
Serialization
use Serializer;
use Serialize;
let data = Simple ;
let redis_value = data.serialize?;
// Use redis_value with redis-rs commands
Features
- Deserialization: Convert
redis::Valuetypes into Rust types using serde - Serialization: Convert Rust types into
redis::Valuetypes using serde - Support for all common Rust types (primitives, structs, enums, collections, etc.)
- Compatible with redis-rs 0.32+
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
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.