block-db 0.2.0

Local, multi-threaded, durable byte DB.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Authors: Robert Lopez

#![allow(unused_parens)]
pub mod bytes;
pub mod io;

use super::DataFile;
use nanoid::nanoid;

impl DataFile {
    pub fn is_full(&self) -> bool {
        self.used_bytes >= self.options_store.max_file_size()
    }

    pub fn generate_id() -> String {
        nanoid!(8)
    }
}