Struct cdb::CDB [] [src]

pub struct CDB { /* fields omitted */ }

CDB file reader

Methods

impl CDB
[src]

Constructs a new CDB reader from an already opened file.

Examples

use std::fs;

let file = fs::File::open("tests/test1.cdb").unwrap();
let cdb = cdb::CDB::new(file).unwrap();

Constructs a new CDB by opening a file.

Examples

let cdb = cdb::CDB::open("tests/test1.cdb").unwrap();

Find all records with the named key.

Examples

let mut cdb = cdb::CDB::open("tests/test1.cdb").unwrap();

for result in cdb.find(b"one") {
    println!("{:?}", result.unwrap());
}