dicedb-rs 0.1.5

Rust SDK for DiceDb.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use dicedb_rs::{client::Client, errors::ClientError};

fn main() -> Result<(), ClientError> {
    // Create a new client
    let mut client = Client::new("localhost".to_string(), 7379).unwrap();

    // Set a key
    client.set("Hello", "World")?;

    // Get a key
    let value = client.get("Hello")?;
    println!("Hello: {}", value);

    Ok(())
}