zebra_state

Trait WriteDisk

source
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§

source

fn zs_insert<C, K, V>(&mut self, cf: &C, key: K, value: V)
where C: AsColumnFamilyRef, K: IntoDisk + Debug, V: IntoDisk,

Serialize and insert the given key and value into a rocksdb column family, overwriting any existing value for key.

source

fn zs_delete<C, K>(&mut self, cf: &C, key: K)
where C: AsColumnFamilyRef, K: IntoDisk + Debug,

Remove the given key from a rocksdb column family, if it exists.

source

fn zs_delete_range<C, K>(&mut self, cf: &C, from: K, until_strictly_before: K)
where C: AsColumnFamilyRef, K: IntoDisk + Debug,

Delete the given key range from a rocksdb column family, if it exists, including from and excluding until_strictly_before.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> WriteDisk for &mut T
where T: WriteDisk,

source§

fn zs_insert<C, K, V>(&mut self, cf: &C, key: K, value: V)
where C: AsColumnFamilyRef, K: IntoDisk + Debug, V: IntoDisk,

source§

fn zs_delete<C, K>(&mut self, cf: &C, key: K)
where C: AsColumnFamilyRef, K: IntoDisk + Debug,

source§

fn zs_delete_range<C, K>(&mut self, cf: &C, from: K, until_strictly_before: K)
where C: AsColumnFamilyRef, K: IntoDisk + Debug,

Implementors§

source§

impl WriteDisk for DiskWriteBatch

§Deprecation

These impls should not be used in new code, use WriteTypedBatch instead.