Crate embedded_redis
source ·Expand description
This crate offers a non-blocking Redis Client for no_std targets. Both RESP2 and RESP3 protocol are supported.
This crate consists of three parts:
- network module for network details (connection handling, response management, etc.) + regular command client
- commands module for Redis command abstractions
- subscription module for Redis subscription client
let mut stack = Stack::default();
let clock = StandardClock::default();
let server_address = SocketAddr::from_str("127.0.0.1:6379").unwrap();
let mut connection_handler = ConnectionHandler::resp2(server_address);
let client = connection_handler.connect(&mut stack, Some(&clock)).unwrap();
let future = client.set("key", "value").unwrap();
let response = future.wait().unwrap();
Modules§
- Redis command abstractions
- Connection and regular Client logic
- Subscription client