[−][src]Struct tendermint_light_client::store::sled::utils::KeyValueDb
Provides a view over the database for storing key/value pairs at the given prefix.
Implementations
impl<K, V> KeyValueDb<K, V>
[src]
pub fn new(prefix: impl Into<Vec<u8>>) -> Self
[src]
Create a view over the database for storing key/value pairs at the given prefix.
impl<K, V> KeyValueDb<K, V> where
K: Serialize,
V: Serialize + DeserializeOwned,
[src]
K: Serialize,
V: Serialize + DeserializeOwned,
pub fn get(&self, db: &Db, key: &K) -> Result<Option<V>, Error>
[src]
Get the value associated with a key within this view in the given sled database.
pub fn contains_key(&self, db: &Db, key: &K) -> Result<bool, Error>
[src]
Check whether there exists a key within this view in the given sled database.
pub fn insert(&self, db: &Db, key: &K, value: &V) -> Result<(), Error>
[src]
Insert a value associated with a key within this view in the given sled database.
pub fn remove(&self, db: &Db, key: &K) -> Result<(), Error>
[src]
Remove the value associated with a key within this view in the given sled database.
pub fn iter(&self, db: &Db) -> impl DoubleEndedIterator<Item = V>
[src]
Iterate over all values within this view in the given sled database.
Trait Implementations
impl<K: Clone, V: Clone> Clone for KeyValueDb<K, V>
[src]
fn clone(&self) -> KeyValueDb<K, V>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<K: Debug, V: Debug> Debug for KeyValueDb<K, V>
[src]
Auto Trait Implementations
impl<K, V> RefUnwindSafe for KeyValueDb<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for KeyValueDb<K, V> where
K: Send,
V: Send,
K: Send,
V: Send,
impl<K, V> Sync for KeyValueDb<K, V> where
K: Sync,
V: Sync,
K: Sync,
V: Sync,
impl<K, V> Unpin for KeyValueDb<K, V> where
K: Unpin,
V: Unpin,
K: Unpin,
V: Unpin,
impl<K, V> UnwindSafe for KeyValueDb<K, V> where
K: UnwindSafe,
V: UnwindSafe,
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,