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

source§

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

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

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

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

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

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

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.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.