Trait casserole::Casserole[][src]

pub trait Casserole<S>: Sized where
    S: Store
{ type Target: Serialize; fn casserole(&self, store: &mut S) -> Result<Self::Target, S::Error>;
fn decasserole(
        target: &Self::Target,
        store: &mut S
    ) -> Result<Self, S::Error>; }
Expand description

The Casserole trait provides reduction and restoration of values to compact form where sub-values are stored in a Store, which can be a content-addressable database.

Associated Types

The target type. Usually contains all the details of the original types except some sub-values which are stored in a DB and are only accessible via a key.

Required methods

Serialization that handles folding. The returned value is a folded representation of the given type, where the folded portions are saved in a store.

This function is expected to use the store to perform puts.

The reverse of casserole, returning the original object. This function is expected to use the given store to preform gets.

Implementations on Foreign Types

Implementation of HashMap in casserole is done as a sorted map, where the values are proxied by Store keys. In the future, we may use a tree of key-value pairs so that slightly different maps will be stored more efficiently.

Implementation of HashMap in casserole is done as a sorted map, where the values are proxied by Store keys. In the future, we may use a tree of key-value pairs so that slightly different maps will be stored more efficiently.

Implementors