[−][src]Struct dino::Database
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
impl RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnwindSafe for Database
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,