Struct idx::Idx
[−]
[src]
pub struct Idx<K: Copy + PartialEq + Hash, V: Copy + Hash> { /* fields omitted */ }
An index mapping keys to values
Methods
impl<K: Copy + PartialEq + Hash, V: Copy + Hash> Idx<K, V>
[src]
fn new<P: Into<PathBuf> + Clone>(path: P) -> Result<Self>
[src]
Construct a new Idx
given a path
fn insert(&self, k: K, v: V) -> Result<()>
[src]
Insert a new key-value pair into the index, if the key is already there, this is a no-op.
fn get(&self, k: &K) -> Option<&V>
[src]
Get the value, if any, associated with key