MCPcopy Index your code
hub / github.com/OneSignal/serde-redis

github.com/OneSignal/serde-redis @v0.7.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.7.2 ↗ · + Follow
86 symbols 135 edges 4 files 3 documented · 3%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

redis-serde

Build Status Documentation Crates.io Version

serde serialization and deserialization of redis-rs values

Status

  • Deserialization: Everything should work.
  • Serialization: unimplemented

Summary

This crate gives you automatic deserialization of values returned from redis-rs.

use serde_redis::RedisDeserialize;

#[derive(Debug, Deserialize, PartialEq)]
struct Simple {
    a: String,
    b: String,
}

let s: Simple = redis.hgetall("simple_hash")?
                     .deserialize()?;

Future work

  • Work at the redis protocol level instead of redis::Value type.
  • Merge into redis-rs?

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.

Extension points exported contracts — how you extend this code

IntoValueVec (Interface)
(no doc) [2 implementers]
src/decode.rs
RedisDeserialize (Interface)
(no doc) [1 implementers]
src/lib.rs

Core symbols most depended-on inside this repo

next
called by 7
src/decode.rs
deserialize
called by 6
src/lib.rs
read_string
called by 3
src/decode.rs
deserialize_any
called by 3
src/decode.rs
next_bulk
called by 2
src/decode.rs
next_bytes
called by 2
src/decode.rs
from_redis_value
called by 1
src/lib.rs
into_value_vec
called by 1
src/decode.rs

Shape

Method 44
Function 25
Class 13
Enum 2
Interface 2

Languages

Rust100%

Modules by API surface

src/decode.rs50 symbols
tests/de.rs30 symbols
src/lib.rs5 symbols
src/encode.rs1 symbols

For agents

$ claude mcp add serde-redis \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact