vld-redis
Redis integration for vld.
Overview
vld-redis keeps one entrypoint:
impl_to_redis!(conn)
After rebinding, conn becomes a validating wrapper:
- built-in auto-conversion methods:
set/get,mset/mget,hset/hget,lpush/rpush/lpop/rpop,sadd/smembers,zadd/zrange,publish - all other native Redis methods remain available through deref to inner connection
Installation
[]
= { = "0.2", = ["serialize"] }
= "0.2"
= "0.32"
= { = "1", = ["derive"] }
Quick start
use Client;
use *;
schema!
let user = UserSchema ;
let client = open?;
let conn = client.get_connection?;
impl_to_redis!;
conn.set?;
let loaded: = conn.get?;
conn.mset?;
let _many: = conn.mget?;
conn.hset?;
let _from_hash: = conn.hget?;
let _list_len = conn.lpush?;
let _set_added = conn.sadd?;
let _zadd = conn.zadd?;
let _subscribers = conn.publish?;
println!;
# Ok::
Example
License
MIT