mirror of
https://github.com/Drop-OSS/dropbreak.git
synced 2026-07-18 18:04:32 -04:00
413f13ddc94d135036f45773fcef2ffc7ae80711
This is due to rust-lang/rust#37345, once that is fixed this can be reverted
Rustbreak
Rustbreak is an Daybreak inspired file database. It is meant to be fast and simple to use.
Features
- Simple To Use, Fast, Secure
- Threadsafe
Usage
Usage is quite simple:
- Create/open a database using
Database::open- You can specify the kind of Key you want using this Syntax:
Database::<Key>::open
- You can specify the kind of Key you want using this Syntax:
Insert/Retrievedata from the Database- Don't forget to run
flushperiodically
use rustbreak::Database;
fn main() {
let db = Database::open("my_contacts").unwrap();
db.insert("Lapfox", "lapfoxtrax.com").unwrap();
db.insert("Rust", "github.com/rust-lang/rust").unwrap();
// we need to be explicit about the kind of type we want as println! is
// generic
let rust : String = db.retrieve("Rust").unwrap();
println!("You can find Rust at: {}", rust);
db.flush().unwrap();
}
Languages
Rust
100%