Struct kgdata::db::ReadonlyRocksDBDict
source · pub struct ReadonlyRocksDBDict<K: AsRef<[u8]>, V> { /* private fields */ }
Implementations§
Trait Implementations§
source§impl<K: AsRef<[u8]> + Eq + Hash, V: Send + Sync> Map<K, V> for ReadonlyRocksDBDict<K, V>
impl<K: AsRef<[u8]> + Eq + Hash, V: Send + Sync> Map<K, V> for ReadonlyRocksDBDict<K, V>
source§fn contains_key<Q>(&self, key: &Q) -> Result<bool, KGDataError>
fn contains_key<Q>(&self, key: &Q) -> Result<bool, KGDataError>
Check if a key exists
source§fn slice_get_exist<Q: AsRef<[u8]> + Equivalent<K>>(
&self,
keys: &[Q]
) -> Result<Vec<V>, KGDataError>
fn slice_get_exist<Q: AsRef<[u8]> + Equivalent<K>>( &self, keys: &[Q] ) -> Result<Vec<V>, KGDataError>
Get existing keys – error if any key does not exist
source§fn slice_get_exist_as_map<Q>(
&self,
keys: &[Q]
) -> Result<HashMap<K, V>, KGDataError>
fn slice_get_exist_as_map<Q>( &self, keys: &[Q] ) -> Result<HashMap<K, V>, KGDataError>
Get existing keys as a map – error if any key does not exist
fn iter_get<I: IntoIterator<Item = Q>, Q>( &self, keys: I ) -> Result<Vec<Option<V>>, KGDataError>
fn iter_get_exist<I: IntoIterator<Item = Q>, Q>( &self, keys: I ) -> Result<Vec<V>, KGDataError>
fn iter_get_exist_as_map<I: IntoIterator<Item = Q>, Q>( &self, keys: I ) -> Result<HashMap<K, V>, KGDataError>
source§fn par_slice_get<Q: AsRef<[u8]> + Sync + Send + Equivalent<K>>(
&self,
keys: &[Q]
) -> Result<Vec<Option<V>>, KGDataError>
fn par_slice_get<Q: AsRef<[u8]> + Sync + Send + Equivalent<K>>( &self, keys: &[Q] ) -> Result<Vec<Option<V>>, KGDataError>
Get multiple keys in parallel
fn par_slice_get_exist<Q: AsRef<[u8]> + Sync + Send + Equivalent<K>>( &self, keys: &[Q] ) -> Result<Vec<V>, KGDataError>
fn par_slice_get_exist_as_map<Q>( &self, keys: &[Q] ) -> Result<HashMap<K, V>, KGDataError>
Auto Trait Implementations§
impl<K, V> Freeze for ReadonlyRocksDBDict<K, V>
impl<K, V> RefUnwindSafe for ReadonlyRocksDBDict<K, V>
impl<K, V> Send for ReadonlyRocksDBDict<K, V>
impl<K, V> Sync for ReadonlyRocksDBDict<K, V>
impl<K, V> Unpin for ReadonlyRocksDBDict<K, V>
impl<K, V> UnwindSafe for ReadonlyRocksDBDict<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