| Crates.io | redis-serde |
| lib.rs | redis-serde |
| version | 0.15.0 |
| created_at | 2025-11-13 07:43:29.959084+00 |
| updated_at | 2025-11-13 07:43:29.959084+00 |
| description | Serde serialization and deserialization for redis-rs. |
| homepage | |
| repository | https://github.com/ezex-io/redis-serde |
| max_upload_size | |
| id | 1930626 |
| size | 87,370 |
serde serialization and deserialization of redis-rs values
This crate is a fork of OneSignal/serde-redis with full serialization support added.
This crate provides automatic serialization and deserialization of values for use with redis-rs.
use redis_serde::RedisDeserialize;
#[derive(Debug, Deserialize, PartialEq)]
struct Simple {
a: String,
b: String,
}
let s: Simple = redis.hgetall("simple_hash")?
.deserialize()?;
use redis_serde::Serializer;
use serde::Serialize;
#[derive(Debug, Serialize, PartialEq)]
struct Simple {
a: String,
b: String,
}
let data = Simple {
a: "value1".to_string(),
b: "value2".to_string(),
};
let redis_value = data.serialize(Serializer)?;
// Use redis_value with redis-rs commands
redis::Value types into Rust types using serderedis::Value types using serdeLicensed under either of
at your option.
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.