[][src]Struct merkletree::store::LevelCacheStore

pub struct LevelCacheStore<E: Element> { /* fields omitted */ }

The LevelCacheStore is used to reduce the on-disk footprint even further to the minimum at the cost of build time performance. Each LevelCacheStore is created with a StoreConfig object which contains the number of binary tree levels above the base that are 'cached'. This implementation has hard requirements about the on disk file size based on that number of levels, so on-disk files are tied, structurally to the configuration they were built with and can only be accessed with the same number of levels.

NOTE: Unlike other store types, writes of any kind are not supported (except deletion) since we're accessing specially crafted on-disk data that requires a particular access pattern dictated at the time of creation/compaction.

Methods

impl<E: Element> LevelCacheStore<E>[src]

pub fn store_size(&self) -> usize[src]

pub fn store_read_range(&self, start: usize, end: usize) -> Vec<u8>[src]

pub fn store_read_into(&self, start: usize, end: usize, buf: &mut [u8])[src]

pub fn store_copy_from_slice(&mut self, _start: usize, _slice: &[u8])[src]

Trait Implementations

impl<E: Element> Store<E> for LevelCacheStore<E>[src]

impl<E: Element> Clone for LevelCacheStore<E>[src]

impl<E: Debug + Element> Debug for LevelCacheStore<E>[src]

impl<E: Element> Deref for LevelCacheStore<E>[src]

type Target = [E]

The resulting type after dereferencing.

impl<E: Element> IndexedParallelIterator for LevelCacheStore<E>[src]

impl<'a, E: Element> IndexedParallelIterator for &'a LevelCacheStore<E>[src]

impl<E: Element> ParallelIterator for LevelCacheStore<E>[src]

type Item = E

The type of item that this parallel iterator produces. For example, if you use the [for_each] method, this is the type of item that your closure will be invoked with. Read more

impl<'a, E: Element> ParallelIterator for &'a LevelCacheStore<E>[src]

type Item = E

The type of item that this parallel iterator produces. For example, if you use the [for_each] method, this is the type of item that your closure will be invoked with. Read more

Auto Trait Implementations

impl<E> Send for LevelCacheStore<E>

impl<E> Sync for LevelCacheStore<E>

impl<E> Unpin for LevelCacheStore<E> where
    E: Unpin

impl<E> UnwindSafe for LevelCacheStore<E> where
    E: UnwindSafe

impl<E> RefUnwindSafe for LevelCacheStore<E> where
    E: RefUnwindSafe

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<T> IntoParallelIterator for T where
    T: ParallelIterator
[src]

type Iter = T

The parallel iterator type that will be created.

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.

impl<'data, I> IntoParallelRefIterator<'data> for I where
    I: 'data + ?Sized,
    &'data I: IntoParallelIterator
[src]

type Iter = <&'data I as IntoParallelIterator>::Iter

The type of the parallel iterator that will be returned.

type Item = <&'data I as IntoParallelIterator>::Item

The type of item that the parallel iterator will produce. This will typically be an &'data T reference type. Read more

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