Enum aleo_rust::snarkvm_types::Query
source · pub enum Query<N, B>where
N: Network,
B: BlockStorage<N>,{
VM(BlockStore<N, B>),
REST(String),
}
Variants§
Implementations§
source§impl<N, B> Query<N, B>where
N: Network,
B: BlockStorage<N>,
impl<N, B> Query<N, B>where N: Network, B: BlockStorage<N>,
sourcepub fn get_program(
&self,
program_id: &ProgramID<N>
) -> Result<ProgramCore<N, Instruction<N>, Command<N>>, Error>
pub fn get_program( &self, program_id: &ProgramID<N> ) -> Result<ProgramCore<N, Instruction<N>, Command<N>>, Error>
Returns the program for the given program ID.
Trait Implementations§
source§impl<N, B> From<&BlockStore<N, B>> for Query<N, B>where
N: Network,
B: BlockStorage<N>,
impl<N, B> From<&BlockStore<N, B>> for Query<N, B>where N: Network, B: BlockStorage<N>,
source§fn from(block_store: &BlockStore<N, B>) -> Query<N, B>
fn from(block_store: &BlockStore<N, B>) -> Query<N, B>
Converts to this type from the input type.
source§impl<N, B> From<BlockStore<N, B>> for Query<N, B>where
N: Network,
B: BlockStorage<N>,
impl<N, B> From<BlockStore<N, B>> for Query<N, B>where N: Network, B: BlockStorage<N>,
source§fn from(block_store: BlockStore<N, B>) -> Query<N, B>
fn from(block_store: BlockStore<N, B>) -> Query<N, B>
Converts to this type from the input type.
source§impl<N, B> QueryTrait<N> for Query<N, B>where
N: Network,
B: BlockStorage<N>,
impl<N, B> QueryTrait<N> for Query<N, B>where N: Network, B: BlockStorage<N>,
source§fn current_state_root(&self) -> Result<<N as Network>::StateRoot, Error>
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, Global>>where
'life0: 'async_trait,
Query<N, B>: 'async_trait,
fn current_state_root_async<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<<N as Network>::StateRoot, Error>> + 'async_trait, Global>>where 'life0: 'async_trait, Query<N, B>: 'async_trait,
Returns the current state root.
source§fn get_state_path_for_commitment(
&self,
commitment: &Field<N>
) -> Result<StatePath<N>, Error>
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, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Query<N, B>: 'async_trait,
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, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Query<N, B>: 'async_trait,
Returns a state path for the given commitment
.
Auto Trait Implementations§
impl<N, B> !RefUnwindSafe for Query<N, B>
impl<N, B> Send for Query<N, B>
impl<N, B> Sync for Query<N, B>
impl<N, B> Unpin for Query<N, B>where B: Unpin,
impl<N, B> !UnwindSafe for Query<N, B>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more