6 releases (3 breaking)
0.4.0 | Apr 23, 2023 |
---|---|
0.3.1 | Nov 24, 2022 |
0.3.0 | Jul 7, 2022 |
0.2.0 | May 25, 2022 |
0.1.1 | May 24, 2022 |
#2033 in Database interfaces
27 downloads per month
89KB
2.5K
SLoC
Redust
A simple Redis client for Rust.
lib.rs
:
A simple Redis client & RESP parser for Rust.
use redust::{resp::{Data, from_data}, Connection};
let mut conn = Connection::new("localhost:6379").await?;
let res: Data = conn.cmd(["PING"]).await?;
let deserialized: &str = from_data(res)?;
assert_eq!(deserialized, "PONG");
Connection
s implement TryStream
and Sink
for ergonomic
and idiomatic use.
Data is returned to the client as static resp::Data
. The [resp] crate contains several
[serde] utilities for converting RESP into Rust structures. For reading data from a connection,
use resp::from_data
.
Additional Features
Dependencies
~5–14MB
~170K SLoC