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
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.
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.