[][src]Struct dino::Database

pub struct Database {
    pub path: String,
    // some fields omitted
}

The main struct of Dino. The Database struct is responsible for creating the storage instance that will store this database's documents, managing the database tables as well as providing access to the default table.

Fields

path: String

The path of the file in a String format

Implementations

impl Database[src]

pub fn new(path: &str) -> Database[src]

Create a new instance of the Database

pub fn load(&mut self)[src]

Load the database from the file and initialize variables

pub fn insert_tree(&mut self, key: &str, value: Tree)[src]

Insert a key with a subtree in the database

pub fn insert(&mut self, key: &str, value: &str)[src]

Insert a key and a value in the database

pub fn find(&self, key: &str) -> &Value[src]

Find a value in the db

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.