Type Alias SaplingTxIdsCf

Source
pub type SaplingTxIdsCf<'cf> = TypedColumnFamily<'cf, SaplingScannedDatabaseIndex, Option<SaplingScannedResult>>;
Expand description

The type for reading sapling transaction IDs results from the database.

This constant should be used so the compiler can detect incorrectly typed accesses to the column family.

Aliased Type§

struct SaplingTxIdsCf<'cf> { /* private fields */ }

Implementations

Source§

impl<Key, Value> TypedColumnFamily<'_, Key, Value>
where Key: IntoDisk + FromDisk + Debug + Ord, Value: IntoDisk + FromDisk,

Source

pub fn zs_items_in_range_ordered<Range>( &self, range: Range, ) -> BTreeMap<Key, Value>
where Range: RangeBounds<Key>,

Returns the keys and values in this column family in range, in an ordered BTreeMap.

Holding this iterator open might delay block commit transactions.

Source§

impl<Key, Value> TypedColumnFamily<'_, Key, Value>
where Key: IntoDisk + FromDisk + Debug + Hash + Eq, Value: IntoDisk + FromDisk,

Source

pub fn zs_items_in_range_unordered<Range>( &self, range: Range, ) -> HashMap<Key, Value>
where Range: RangeBounds<Key>,

Returns the keys and values in this column family in range, in an unordered HashMap.

Holding this iterator open might delay block commit transactions.

Source§

impl<'cf, Key, Value> TypedColumnFamily<'cf, Key, Value>
where Key: IntoDisk + FromDisk + Debug, Value: IntoDisk + FromDisk,

Source

pub fn new( db: &'cf DiskDb, cf_name: &str, ) -> Option<TypedColumnFamily<'cf, Key, Value>>

Returns a new typed column family, if it exists in the database.

Source

pub fn new_batch_for_writing( self, ) -> WriteTypedBatch<'cf, Key, Value, DiskWriteBatch>

Returns a typed writer for this column family for a new batch.

These methods are the only way to get a WriteTypedBatch, which ensures that the read and write types are consistent.

Source

pub fn take_batch_for_writing( self, batch: DiskWriteBatch, ) -> WriteTypedBatch<'cf, Key, Value, DiskWriteBatch>

Wraps an existing write batch, and returns a typed writer for this column family.

These methods are the only way to get a WriteTypedBatch, which ensures that the read and write types are consistent.

Source

pub fn with_batch_for_writing( self, batch: &mut DiskWriteBatch, ) -> WriteTypedBatch<'cf, Key, Value, &mut DiskWriteBatch>

Wraps an existing write batch reference, and returns a typed writer for this column family.

These methods are the only way to get a WriteTypedBatch, which ensures that the read and write types are consistent.

Source

pub fn zs_is_empty(&self) -> bool

Returns true if this rocksdb column family does not contain any entries.

Source

pub fn zs_get(&self, key: &Key) -> Option<Value>

Returns the value for key in this rocksdb column family, if present.

Source

pub fn zs_contains(&self, key: &Key) -> bool

Check if this rocksdb column family contains the serialized form of key.

Source

pub fn zs_first_key_value(&self) -> Option<(Key, Value)>

Returns the lowest key in this column family, and the corresponding value.

Returns None if this column family is empty.

Source

pub fn zs_last_key_value(&self) -> Option<(Key, Value)>

Returns the highest key in this column family, and the corresponding value.

Returns None if this column family is empty.

Source

pub fn zs_next_key_value_from(&self, lower_bound: &Key) -> Option<(Key, Value)>

Returns the first key greater than or equal to lower_bound in this column family, and the corresponding value.

Returns None if there are no keys greater than or equal to lower_bound.

Source

pub fn zs_next_key_value_strictly_after( &self, lower_bound: &Key, ) -> Option<(Key, Value)>

Returns the first key strictly greater than lower_bound in this column family, and the corresponding value.

Returns None if there are no keys greater than lower_bound.

Source

pub fn zs_prev_key_value_back_from( &self, upper_bound: &Key, ) -> Option<(Key, Value)>

Returns the first key less than or equal to upper_bound in this column family, and the corresponding value.

Returns None if there are no keys less than or equal to upper_bound.

Source

pub fn zs_prev_key_value_strictly_before( &self, upper_bound: &Key, ) -> Option<(Key, Value)>

Returns the first key strictly less than upper_bound in this column family, and the corresponding value.

Returns None if there are no keys less than upper_bound.

Source

pub fn zs_forward_range_iter<Range>( &self, range: Range, ) -> impl Iterator<Item = (Key, Value)>
where Range: RangeBounds<Key>,

Returns a forward iterator over the items in this column family in range.

Holding this iterator open might delay block commit transactions.

Source

pub fn zs_reverse_range_iter<Range>( &self, range: Range, ) -> impl Iterator<Item = (Key, Value)>
where Range: RangeBounds<Key>,

Returns a reverse iterator over the items in this column family in range.

Holding this iterator open might delay block commit transactions.

Trait Implementations

Source§

impl<'cf, Key, Value> Clone for TypedColumnFamily<'cf, Key, Value>
where Key: Clone + IntoDisk + FromDisk + Debug, Value: Clone + IntoDisk + FromDisk,

Source§

fn clone(&self) -> TypedColumnFamily<'cf, Key, Value>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Key, Value> Debug for TypedColumnFamily<'_, Key, Value>
where Key: IntoDisk + FromDisk + Debug, Value: IntoDisk + FromDisk,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<Key, Value> PartialEq for TypedColumnFamily<'_, Key, Value>
where Key: IntoDisk + FromDisk + Debug, Value: IntoDisk + FromDisk,

Source§

fn eq(&self, other: &TypedColumnFamily<'_, Key, Value>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Key, Value> Eq for TypedColumnFamily<'_, Key, Value>
where Key: IntoDisk + FromDisk + Debug, Value: IntoDisk + FromDisk,