pub trait WriteDisk {
// Required methods
fn zs_insert<C, K, V>(&mut self, cf: &C, key: K, value: V)
where C: AsColumnFamilyRef,
K: IntoDisk + Debug,
V: IntoDisk;
fn zs_delete<C, K>(&mut self, cf: &C, key: K)
where C: AsColumnFamilyRef,
K: IntoDisk + Debug;
fn zs_delete_range<C, K>(
&mut self,
cf: &C,
from: K,
until_strictly_before: K,
)
where C: AsColumnFamilyRef,
K: IntoDisk + Debug;
}
Expand description
Helper trait for inserting serialized typed (Key, Value) pairs into rocksdb.
§Deprecation
This trait should not be used in new code, use WriteTypedBatch
instead.
Required Methods§
Sourcefn zs_insert<C, K, V>(&mut self, cf: &C, key: K, value: V)
fn zs_insert<C, K, V>(&mut self, cf: &C, key: K, value: V)
Serialize and insert the given key and value into a rocksdb column family,
overwriting any existing value
for key
.
Sourcefn zs_delete<C, K>(&mut self, cf: &C, key: K)
fn zs_delete<C, K>(&mut self, cf: &C, key: K)
Remove the given key from a rocksdb column family, if it exists.
Sourcefn zs_delete_range<C, K>(&mut self, cf: &C, from: K, until_strictly_before: K)
fn zs_delete_range<C, K>(&mut self, cf: &C, from: K, until_strictly_before: K)
Delete the given key range from a rocksdb column family, if it exists, including from
and excluding until_strictly_before
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<T> WriteDisk for &mut Twhere
T: WriteDisk,
impl<T> WriteDisk for &mut Twhere
T: WriteDisk,
Implementors§
impl WriteDisk for DiskWriteBatch
§Deprecation
These impls should not be used in new code, use WriteTypedBatch
instead.