[][src]Struct agilulf::DatabaseBuilder

pub struct DatabaseBuilder { /* fields omitted */ }

Database factory, which can be used in order to configure the properties of a new database.

Methods can be chained on it in order to configure it.

The two configurations available are:

  • restore: chooese whether restore from previous existing log. The default value is true.

  • base_dir: choose where the base directory is. Base directory is used to store log, MANIFEST and SSTables. The default value of base_dir is /var/tmp/agilulf.

Example

let database = DatabaseBuilder::default().restore(false).build().unwrap();

Methods

impl DatabaseBuilder[src]

pub fn restore(&mut self, restore: bool) -> &mut Self[src]

pub fn base_dir(&mut self, base_dir: String) -> &mut Self[src]

pub fn build(&self) -> Result<Database, StorageError>[src]

Trait Implementations

impl Default for DatabaseBuilder[src]

Auto Trait Implementations

Blanket Implementations

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.

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

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

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

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> Erased for T