chunks 0.1.1

Parallel-ish chunk loading that might make things slower.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::fmt::Debug;
use std::hash::Hash;
use std::io;

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