pub struct Index<K, V> { /* private fields */ }
Expand description
On-disk index structure mapping keys to values
Implementations§
source§impl<K, V> Index<K, V>where
K: 'static + Hash + Copy + PartialEq,
V: 'static + Hash + Copy,
impl<K, V> Index<K, V>where
K: 'static + Hash + Copy + PartialEq,
V: 'static + Hash + Copy,
sourcepub fn insert(&self, key: K, val: V) -> Result<AlreadyThere>
pub fn insert(&self, key: K, val: V) -> Result<AlreadyThere>
Inserts a key-value pair into the index, if the key is already present, this is a no-op
sourcepub fn on_disk_size(&self) -> usize
pub fn on_disk_size(&self) -> usize
Get the approximate size on disk for the index