QueryTrait

Trait QueryTrait 

Source
pub trait QueryTrait<N>
where N: Network,
{ // Required methods fn current_state_root(&self) -> Result<<N as Network>::StateRoot, Error>; fn current_state_root_async<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<<N as Network>::StateRoot, Error>> + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn get_state_path_for_commitment( &self, commitment: &Field<N>, ) -> Result<StatePath<N>, Error>; fn get_state_path_for_commitment_async<'life0, 'life1, 'async_trait>( &'life0 self, commitment: &'life1 Field<N>, ) -> Pin<Box<dyn Future<Output = Result<StatePath<N>, Error>> + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; }

Required Methods§

Source

fn current_state_root(&self) -> Result<<N as Network>::StateRoot, Error>

Returns the current state root.

Source

fn current_state_root_async<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<<N as Network>::StateRoot, Error>> + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns the current state root.

Source

fn get_state_path_for_commitment( &self, commitment: &Field<N>, ) -> Result<StatePath<N>, Error>

Returns a state path for the given commitment.

Source

fn get_state_path_for_commitment_async<'life0, 'life1, 'async_trait>( &'life0 self, commitment: &'life1 Field<N>, ) -> Pin<Box<dyn Future<Output = Result<StatePath<N>, Error>> + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Returns a state path for the given commitment.

Implementors§

Source§

impl<N, B> QueryTrait<N> for Query<N, B>
where N: Network, B: BlockStorage<N>,