valkeyre

Crates.iovalkeyre
lib.rsvalkeyre
version0.1.1
sourcesrc
created_at2023-11-23 03:44:46.5565
updated_at2023-11-23 03:52:07.273862
descriptionA key-value store, prioritizing ease of use.
homepage
repositoryhttps://github.com/drakulah/ValKeyRe
max_upload_size
id1045783
size10,981
DrakOwlAh (drakulah)

documentation

README

ValKeyRe

A key-value store, prioritizing ease of use.

Example

use std::path::PathBuf;

use valkeyre::store::Store;

fn main() {
  let store = Store::init(PathBuf::from("./"), "Valkeyre");

  let store_a = store.init_room("Table A");
  store_a.set("email", "hello@gmail.com");
  store_a.set("pass", "hello123");

  let store_b = store.init_room("Table B");
  store_b.set("email", "yo@gmail.com");
  store_b.set("pass", "yo123");

  println!(
    "{} - {}",
    store_a.get("email").unwrap(),
    store_a.get("pass").unwrap()
  );
  println!(
    "{} - {}",
    store_b.get("email").unwrap(),
    store_b.get("pass").unwrap()
  );

  // hello@gmail.com - hello123
  // yo@gmail.com - yo123
}
Commit count: 13

cargo fmt