pub struct RocksDbState { /* private fields */ }Expand description
A RocksDB-backed KvState (enable with --features rocksdb).
Implementations§
Trait Implementations§
Source§impl KvState for RocksDbState
impl KvState for RocksDbState
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
value: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn iter_prefix<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: Option<&'life1 [u8]>,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Vec<u8>, Vec<u8>)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn iter_prefix<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: Option<&'life1 [u8]>,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Vec<u8>, Vec<u8>)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns all key/value pairs, optionally filtered by a prefix.
Auto Trait Implementations§
impl Freeze for RocksDbState
impl RefUnwindSafe for RocksDbState
impl Send for RocksDbState
impl Sync for RocksDbState
impl Unpin for RocksDbState
impl UnwindSafe for RocksDbState
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