pub trait Store {
type Tree: MerkleTree;
type Error;
type L: Loss;
// Required methods
fn get(&self, oid: &Oid) -> Imperfect<Self::Tree, Self::Error, Self::L>;
fn put(&mut self, tree: Self::Tree) -> Imperfect<Oid, Self::Error, Self::L>;
fn has(&self, oid: &Oid) -> Imperfect<Luminosity, Self::Error, Self::L>;
}Expand description
Where crystals live. Every operation returns Imperfect.
The Store is the third primitive alongside Beam and Prism.
- Beam: the value in motion
- Prism: the transformation
- Store: the persistence
Typed over a MerkleTree — the store knows its tree shape.
Required Associated Types§
Required Methods§
Sourcefn get(&self, oid: &Oid) -> Imperfect<Self::Tree, Self::Error, Self::L>
fn get(&self, oid: &Oid) -> Imperfect<Self::Tree, Self::Error, Self::L>
Retrieve a tree by address. Partial if some dimensions are dark.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".