[−][src]Struct rocks::options::Options
Options to control the behavior of a database (passed to DB::Open
)
use rocks::options::Options; let _opt = Options::default() .map_db_options(|db| db.create_if_missing(true)) .map_cf_options(|cf| cf.disable_auto_compactions(true));
Implementations
impl Options
[src]
pub fn default_instance() -> &'static Options
[src]
default Options
with create_if_missing = true
pub fn new(
dbopt: Option<DBOptions>,
cfopt: Option<ColumnFamilyOptions>
) -> Options
[src]
dbopt: Option<DBOptions>,
cfopt: Option<ColumnFamilyOptions>
) -> Options
pub fn to_cf_options(&self) -> ColumnFamilyOptions
[src]
pub fn to_db_options(&self) -> DBOptions
[src]
pub fn map_db_options<F: FnOnce(DBOptions) -> DBOptions>(self, f: F) -> Self
[src]
Configure DBOptions using builder style.
pub fn map_cf_options<F: FnOnce(ColumnFamilyOptions) -> ColumnFamilyOptions>(
self,
f: F
) -> Self
[src]
self,
f: F
) -> Self
Configure ColumnFamilyOptions using builder style.
pub fn prepare_for_bulk_load(self) -> Self
[src]
Set appropriate parameters for bulk loading.
All data will be in level 0 without any automatic compaction. It's recommended to manually call CompactRange(NULL, NULL) before reading from the database, because otherwise the read can be very slow.
pub fn optimize_for_small_db(self) -> Self
[src]
Use this if your DB is very small (like under 1GB) and you don't want to spend lots of memory for memtables.
Trait Implementations
impl AsRef<Options> for Options
[src]
impl Default for Options
[src]
impl Drop for Options
[src]
impl Sync for Options
[src]
Auto Trait Implementations
impl RefUnwindSafe for Options
impl !Send for Options
impl Unpin for Options
impl UnwindSafe for Options
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>,