pub struct DiskMap<K, V> { /* private fields */ }
Expand description
Implementations§
Source§impl<K, V> DiskMap<K, V>
impl<K, V> DiskMap<K, V>
Sourcepub fn get<Q>(&self, key: Q) -> Option<V>where
Q: Borrow<K>,
pub fn get<Q>(&self, key: Q) -> Option<V>where
Q: Borrow<K>,
Get the value by key name, return None
if no such key
Sourcepub fn try_get(&self, key: &[u8]) -> Result<V, DiskMapError>
pub fn try_get(&self, key: &[u8]) -> Result<V, DiskMapError>
Raw api of DiskMap::get
Sourcepub fn insert<Q>(&self, key: Q, value: V) -> Option<V>where
K: From<Q>,
pub fn insert<Q>(&self, key: Q, value: V) -> Option<V>where
K: From<Q>,
Insert the value by key name, return None
if no such key
Sourcepub fn try_insert(&self, key: &[u8], value: V) -> Result<V, DiskMapError>
pub fn try_insert(&self, key: &[u8], value: V) -> Result<V, DiskMapError>
Raw api of DiskMap::insert
Trait Implementations§
Auto Trait Implementations§
impl<K, V> Freeze for DiskMap<K, V>
impl<K, V> !RefUnwindSafe for DiskMap<K, V>
impl<K, V> Send for DiskMap<K, V>
impl<K, V> Sync for DiskMap<K, V>
impl<K, V> Unpin for DiskMap<K, V>
impl<K, V> !UnwindSafe for DiskMap<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