[][src]Trait bindb::Database

pub trait Database {
    fn tget<T: Table>(&self, k: &T::Key) -> Option<T>;
fn trange<T: Table>(&self, range: Range<&T::Key>) -> Vec<T>;
fn tput<T: Table>(&self, k: &T::Key, v: &T) -> Option<T>;
fn tscan<T: Table>(&self) -> Vec<T>; }

Trait denoting an engine capable of providing storage for tables

Required methods

fn tget<T: Table>(&self, k: &T::Key) -> Option<T>

Serializes the key and retrieves what was stored using this key

fn trange<T: Table>(&self, range: Range<&T::Key>) -> Vec<T>

fn tput<T: Table>(&self, k: &T::Key, v: &T) -> Option<T>

Serializes the key and value using proper formats(Big endian for key, little endian for values) and safely stores this entry in the database

fn tscan<T: Table>(&self) -> Vec<T>

Performs a full table scan of a specified table

Loading content...

Implementations on Foreign Types

impl Database for Tree[src]

Loading content...

Implementors

Loading content...