easy_safe

Crates.ioeasy_safe
lib.rseasy_safe
version0.1.9
sourcesrc
created_at2022-08-07 18:34:55.620983
updated_at2022-08-15 08:36:11.928032
descriptionan easy way to save string values on disk, in short -string maps on disk-
homepage
repositoryhttps://github.com/SilenLoc/easy_safe
max_upload_size
id640329
size28,732
Silen Locatelli (SilenLoc)

documentation

https://docs.rs/easy_safe

README

easy_safe

An easy unstable crate to save strings into a map that is saved on the disk.

The normal map_env creates a new map environment with the specified name. The name corresponds to the file saved and loaded in your filesystem. If the file is already there it will load from that file.

This means you can always come back and access your file if you call it with the right name

Example

use easy_safe::{create_or_load_map_env, MapEnv};
  
let mut  map_env: MapEnv = create_or_load_map_env("somename");
map_env.put("somekey", "somevalue");
let value = map_env.get("somekey").unwrap();
assert_eq!(value, "somevalue");
    
let mut same_file_map_env: MapEnv = create_or_load_map_env("somename");
let also_the_value = same_file_map_env.get("somekey").unwrap();
assert_eq!(value, "somevalue");
Commit count: 0

cargo fmt