rustbreak 1.3.0

A single file database
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
extern crate rustbreak;

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();
}