[][src]Struct merkletree::store::StoreConfig

pub struct StoreConfig {
    pub path: PathBuf,
    pub id: String,
    pub size: Option<usize>,
    pub levels: usize,
}

Fields

path: PathBuf

A directory in which data (a merkle tree) can be persisted.

id: String

A unique identifier used to help specify the on-disk store location for this particular data.

size: Option<usize>

The number of elements in the DiskStore. This field is optional, and unused internally.

levels: usize

The number of merkle tree levels above the base to cache on disk.

Methods

impl StoreConfig[src]

pub fn new(path: String, id: String, levels: usize) -> Self[src]

pub fn data_path(path: &PathBuf, id: &str) -> PathBuf[src]

pub fn from_config(
    config: &StoreConfig,
    id: String,
    size: Option<usize>
) -> Self
[src]

Trait Implementations

impl Clone for StoreConfig[src]

impl Default for StoreConfig[src]

impl Debug for StoreConfig[src]

impl Serialize for StoreConfig[src]

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

Auto Trait Implementations

Blanket Implementations

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

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