pub trait StateStoreReadTestExt: StateStore {
// Required methods
fn get_keyed_row(
&self,
key: TableKey<Bytes>,
epoch: u64,
read_options: ReadOptions,
) -> impl StorageFuture<'_, Option<StateStoreKeyedRow>>;
fn iter(
&self,
key_range: TableKeyRange,
epoch: u64,
read_options: ReadOptions,
) -> impl StorageFuture<'_, <<Self as StateStore>::ReadSnapshot as StateStoreRead>::Iter>;
fn rev_iter(
&self,
key_range: TableKeyRange,
epoch: u64,
read_options: ReadOptions,
) -> impl StorageFuture<'_, <<Self as StateStore>::ReadSnapshot as StateStoreRead>::RevIter>;
fn scan(
&self,
key_range: TableKeyRange,
epoch: u64,
limit: Option<usize>,
read_options: ReadOptions,
) -> impl StorageFuture<'_, Vec<StateStoreKeyedRow>>;
// Provided method
fn get(
&self,
key: TableKey<Bytes>,
epoch: u64,
read_options: ReadOptions,
) -> impl StorageFuture<'_, Option<Bytes>> { ... }
}Required Methods§
Sourcefn get_keyed_row(
&self,
key: TableKey<Bytes>,
epoch: u64,
read_options: ReadOptions,
) -> impl StorageFuture<'_, Option<StateStoreKeyedRow>>
fn get_keyed_row( &self, key: TableKey<Bytes>, epoch: u64, read_options: ReadOptions, ) -> impl StorageFuture<'_, Option<StateStoreKeyedRow>>
Point gets a value from the state store.
The result is based on a snapshot corresponding to the given epoch.
Both full key and the value are returned.
Sourcefn iter(
&self,
key_range: TableKeyRange,
epoch: u64,
read_options: ReadOptions,
) -> impl StorageFuture<'_, <<Self as StateStore>::ReadSnapshot as StateStoreRead>::Iter>
fn iter( &self, key_range: TableKeyRange, epoch: u64, read_options: ReadOptions, ) -> impl StorageFuture<'_, <<Self as StateStore>::ReadSnapshot as StateStoreRead>::Iter>
Opens and returns an iterator for given prefix_hint and full_key_range
Internally, prefix_hint will be used for checking the SST filter and
full_key_range used for iter. (if the prefix_hint not None, it should be be included
in key_range) The returned iterator will iterate data based on a snapshot
corresponding to the given epoch.
fn rev_iter( &self, key_range: TableKeyRange, epoch: u64, read_options: ReadOptions, ) -> impl StorageFuture<'_, <<Self as StateStore>::ReadSnapshot as StateStoreRead>::RevIter>
fn scan( &self, key_range: TableKeyRange, epoch: u64, limit: Option<usize>, read_options: ReadOptions, ) -> impl StorageFuture<'_, Vec<StateStoreKeyedRow>>
Provided Methods§
Sourcefn get(
&self,
key: TableKey<Bytes>,
epoch: u64,
read_options: ReadOptions,
) -> impl StorageFuture<'_, Option<Bytes>>
fn get( &self, key: TableKey<Bytes>, epoch: u64, read_options: ReadOptions, ) -> impl StorageFuture<'_, Option<Bytes>>
Point gets a value from the state store.
The result is based on a snapshot corresponding to the given epoch.
Only the value is returned.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".