Crates.io | pack-db |
lib.rs | pack-db |
version | 0.2.0 |
source | src |
created_at | 2021-11-06 17:23:23.531701 |
updated_at | 2021-11-07 08:08:47.787504 |
description | Simple messagepack based database |
homepage | https://github.com/Tricked-dev/pack-db |
repository | https://github.com/Tricked-dev/pack-db |
max_upload_size | |
id | 477742 |
size | 21,822 |
PackDb is a simple key value messagepack store Inspired by kwik It uses your local storage
pack-db = "0.2.0"
use pack_db::PackDb:
use serde::{Deserialize, Serialize};
#[derive(Debug, PartialEq, Deserialize, Serialize)]
struct User {
name: String,
age: i32
}
let store = PackDb::<User>::new(Some("data".to_owned()));
store.set("user1", User {name: "useer1", age: 16});
let user = store.get("user1");