pub struct ReadonlyRocksDBDict<K: AsRef<[u8]>, V> { /* private fields */ }

Implementations§

source§

impl<K: AsRef<[u8]>, V> ReadonlyRocksDBDict<K, V>

source

pub fn new(db: DB, deser_value: fn(_: &[u8]) -> Result<V, KGDataError>) -> Self

Trait Implementations§

source§

impl<K: AsRef<[u8]> + Eq + Hash, V: Send + Sync> Map<K, V> for ReadonlyRocksDBDict<K, V>

source§

fn get<Q>(&self, key: &Q) -> Result<Option<V>, KGDataError>
where Q: AsRef<[u8]> + Equivalent<K> + ?Sized,

Get a key
source§

fn contains_key<Q>(&self, key: &Q) -> Result<bool, KGDataError>
where Q: AsRef<[u8]> + Equivalent<K> + ?Sized,

Check if a key exists
source§

fn slice_get<Q>(&self, keys: &[Q]) -> Result<Vec<Option<V>>, KGDataError>
where Q: AsRef<[u8]> + Equivalent<K>,

Get multiple keys
source§

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>
where Q: AsRef<[u8]> + Into<K> + Equivalent<K> + Clone,

Get existing keys as a map – error if any key does not exist
source§

fn iter_get<I: IntoIterator<Item = Q>, Q>( &self, keys: I ) -> Result<Vec<Option<V>>, KGDataError>
where Q: AsRef<[u8]> + Equivalent<K>,

source§

fn iter_get_exist<I: IntoIterator<Item = Q>, Q>( &self, keys: I ) -> Result<Vec<V>, KGDataError>
where Q: AsRef<[u8]> + Equivalent<K>,

source§

fn iter_get_exist_as_map<I: IntoIterator<Item = Q>, Q>( &self, keys: I ) -> Result<HashMap<K, V>, KGDataError>
where Q: AsRef<[u8]> + Equivalent<K> + Into<K> + Clone,

source§

fn par_slice_get<Q: AsRef<[u8]> + Sync + Send + Equivalent<K>>( &self, keys: &[Q] ) -> Result<Vec<Option<V>>, KGDataError>

Get multiple keys in parallel
source§

fn par_slice_get_exist<Q: AsRef<[u8]> + Sync + Send + Equivalent<K>>( &self, keys: &[Q] ) -> Result<Vec<V>, KGDataError>

source§

fn par_slice_get_exist_as_map<Q>( &self, keys: &[Q] ) -> Result<HashMap<K, V>, KGDataError>
where K: Sync + Send, Q: AsRef<[u8]> + Into<K> + Sync + Send + Equivalent<K> + Clone,

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> Ungil for T
where T: Send,