Trait chunks::Store [−][src]
pub trait Store: Send + 'static { type Key: Copy + Debug + Eq + Hash + Send; type Value: Send; fn load(&mut self, _: Self::Key) -> Result<Self::Value>; fn store(&mut self, _: Self::Key, _: &Self::Value) -> Result<()>; }
A thing that saves and loads chunks.
Associated Types
type Key: Copy + Debug + Eq + Hash + Send
The thing by which chunks are indexed.
type Value: Send
The stuff in a chunk.
Required Methods
fn load(&mut self, _: Self::Key) -> Result<Self::Value>
Load a chunk.
fn store(&mut self, _: Self::Key, _: &Self::Value) -> Result<()>
Save a chunk.