Registry / networking / mini-redis

mini-redis

JSON →
library0.4.1rscratesunverified

An incomplete implementation of a Rust client and server. Used as a larger example of an idiomatic Tokio application.

# Cargo.toml [dependencies] mini-redis = "0.4.1"
INSTALL
IMPORT
SIG · MINI-REDIS
M
mini-redis
networkingrustv0.4.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
use mini_redis::client::Client;

Connect to a Redis server and perform set/get operations.

use mini_redis::client::Client; #[tokio::main] async fn main() { let mut client = Client::connect("127.0.0.1:6379").await.unwrap(); client.set("hello", "world".into()).await.unwrap(); let val = client.get("hello").await.unwrap(); println!("Got value: {:?}", val); }
Debug
Known issues
gotchaRequires a Tokio runtime to execute async code.
fix
Use #[tokio::main] or manually create a Tokio runtime.
affects: *
Upgrade
Version history
0.4.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
mini-redis — cargo add mini-redis · libregistry