[−][src]Struct agilulf::DatabaseBuilder
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]
fn default() -> DatabaseBuilder
[src]
Auto Trait Implementations
impl Send for DatabaseBuilder
impl Unpin for DatabaseBuilder
impl Sync for DatabaseBuilder
impl UnwindSafe for DatabaseBuilder
impl RefUnwindSafe for DatabaseBuilder
Blanket Implementations
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,