[][src]Struct exonum_merkledb::DbOptions

#[non_exhaustive]pub struct DbOptions {
    pub max_open_files: Option<i32>,
    pub create_if_missing: bool,
    pub compression_type: CompressionType,
}

Options for the database.

These parameters apply to the underlying database of Exonum, currently RocksDB.

Fields (Non-exhaustive)

Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
max_open_files: Option<i32>

Number of open files that can be used by the database.

The underlying database opens multiple files during operation. If your system has a limit on the number of files which can be open simultaneously, you can adjust this option to match the limit. Note, that limiting the number of simultaneously open files might slow down the speed of database operation.

Defaults to None, meaning that the number of open files is unlimited.

create_if_missing: bool

An option to indicate whether the system should create a database or not, if it's missing.

This option applies to the cases when a node was switched off and is on again. If the database cannot be found at the indicated path and this option is switched on, a new database will be created at that path and blocks will be included therein.

Defaults to true.

compression_type: CompressionType

An algorithm used for database compression.

Defaults to CompressionType::None, meaning there is no compression.

Methods

impl DbOptions[src]

pub fn new(
    max_open_files: Option<i32>,
    create_if_missing: bool,
    compression_type: CompressionType
) -> Self
[src]

Creates a new DbOptions object.

Trait Implementations

impl Clone for DbOptions[src]

impl Copy for DbOptions[src]

impl Debug for DbOptions[src]

impl Default for DbOptions[src]

impl<'de> Deserialize<'de> for DbOptions[src]

impl<'_> From<&'_ DbOptions> for RocksDbOptions[src]

impl From<DbOptions> for RocksDbOptions[src]

impl PartialEq<DbOptions> for DbOptions[src]

impl Serialize for DbOptions[src]

impl StructuralPartialEq for DbOptions[src]

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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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<V, T> VZip<V> for T where
    V: MultiLane<T>,