pub struct PersistentHashmap<K: ?Sized, V: Copy> { /* private fields */ }
Implementations§
Source§impl<K: ?Sized, V: Copy + Default> PersistentHashmap<K, V>
impl<K: ?Sized, V: Copy + Default> PersistentHashmap<K, V>
Sourcepub fn new<P>(path: P, size: u64) -> Result<PersistentHashmap<K, V>, Error>
pub fn new<P>(path: P, size: u64) -> Result<PersistentHashmap<K, V>, Error>
Creates a new persistent hashmap
Sourcepub fn open<P>(path: P) -> Result<PersistentHashmap<K, V>, Error>
pub fn open<P>(path: P) -> Result<PersistentHashmap<K, V>, Error>
Opens an existing persistent hashmap
pub fn insert<Q>(&mut self, k: &Q, v: V) -> Result<Option<V>, InsertError>
pub fn get<Q>(&self, k: &Q) -> Option<V>
Auto Trait Implementations§
impl<K, V> Freeze for PersistentHashmap<K, V>where
K: ?Sized,
impl<K, V> RefUnwindSafe for PersistentHashmap<K, V>
impl<K, V> Send for PersistentHashmap<K, V>
impl<K, V> Sync for PersistentHashmap<K, V>
impl<K, V> Unpin for PersistentHashmap<K, V>
impl<K, V> UnwindSafe for PersistentHashmap<K, V>
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