A derive to store and retrieve JSON values in redis encoded using serde.
Cargo.toml:
toml
[dependencies]
derive-redis-json = "0.1.1"
main.rs:
```rust use std::sync::Arc;
use anyhow::Result; use deadpoolredis::{redis::cmd, Pool as RedisPool}; use deriveredis_json::RedisJsonValue; use serde::{Deserialize, Serialize};
pub struct User { pub id: u64, pub name: String, }
pub async fn adduser(
redispool: Arc
Ok(res) }
pub async fn getusers(
redispool: Arc
Ok(res) } ```