[][src]Struct agilulf::MemDatabase

pub struct MemDatabase { /* fields omitted */ }

A simple RAM only database with skiplist as kernel.

The type of Value in skiplist is either NotExist (used for deleting element) or Slice.

Methods

impl MemDatabase[src]

pub fn restore_from_iterator<I: Iterator<Item = Command>>(
    iter: I
) -> Result<MemDatabase, StorageError>
[src]

It can read from command iterator and run every command on MemDatabase. It is very useful for restoring data from log.

pub fn large_enough(&self) -> bool[src]

This function decide whether MemDatabase is too large. As every key and value is (256 + 8) bytes, nearly 1MB is the threshold.

Trait Implementations

impl SyncDatabase for MemDatabase[src]

impl Drop for MemDatabase[src]

impl Default for MemDatabase[src]

Auto Trait Implementations

impl Send for MemDatabase

impl Unpin for MemDatabase

impl Sync for MemDatabase

impl UnwindSafe for MemDatabase

impl RefUnwindSafe for MemDatabase

Blanket Implementations

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

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

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> Erased for T