Struct substreams::store::StoreGetRaw
source · pub struct StoreGetRaw { /* private fields */ }
Expand description
RawStoreGet is a struct representing a read only store store
Trait Implementations§
source§impl StoreGet<Vec<u8>> for StoreGetRaw
impl StoreGet<Vec<u8>> for StoreGetRaw
source§fn new(idx: u32) -> StoreGetRaw
fn new(idx: u32) -> StoreGetRaw
Return a StoreGet object with a store index set
source§fn get_at<K: AsRef<str>>(&self, ord: u64, key: K) -> Option<Vec<u8>>
fn get_at<K: AsRef<str>>(&self, ord: u64, key: K) -> Option<Vec<u8>>
Allows you to read a single key from the store. The type of its value can be anything, and is usually declared in the output section of the manifest. The ordinal is used here to go query a key that might have changed mid-block by the store module that built it.
source§fn get_last<K: AsRef<str>>(&self, key: K) -> Option<Vec<u8>>
fn get_last<K: AsRef<str>>(&self, key: K) -> Option<Vec<u8>>
Retrieves a key from the store, like get_at
, but querying the state of
the store as of the beginning of the block being processed, before any changes
were applied within the current block. It does not need to rewind any changes
in the middle of the block.
source§fn get_first<K: AsRef<str>>(&self, key: K) -> Option<Vec<u8>>
fn get_first<K: AsRef<str>>(&self, key: K) -> Option<Vec<u8>>
Retrieves a key from the store, like get_at
, but querying the state of
the store as of the beginning of the block being processed, before any changes
were applied within the current block. However, it needs to unwind any keys that
would have changed mid-block, so will be slightly less performant.
source§fn has_at<K: AsRef<str>>(&self, ord: u64, key: K) -> bool
fn has_at<K: AsRef<str>>(&self, ord: u64, key: K) -> bool
Checks if a key exists in the store. The ordinal is used here to check if a key that might have changed mid-block by the store module that built it exists.
source§fn has_last<K: AsRef<str>>(&self, key: K) -> bool
fn has_last<K: AsRef<str>>(&self, key: K) -> bool
Checks if a key exists in the store, like has_at
, but querying the state of
the store as of the beginning of the block being processed, before any changes
were applied within the current block. It does not need to rewind any changes
in the middle of the block.
source§fn has_first<K: AsRef<str>>(&self, key: K) -> bool
fn has_first<K: AsRef<str>>(&self, key: K) -> bool
Checks if a key exists in the store, like has_at
, but querying the state of
the store as of the beginning of the block being processed, before any changes
were applied within the current block. However, it needs to unwind any keys that
would have changed mid-block, so will be slightly less performant.