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>
impl<K, V> Index<K, V>
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
Trait Implementations§
Auto Trait Implementations§
impl<K, V> !Freeze for Index<K, V>
impl<K, V> !RefUnwindSafe for Index<K, V>
impl<K, V> Unpin for Index<K, V>
impl<K, V> UnwindSafe for Index<K, V>where
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more