Enum snarkvm_ledger_query::Query
source · pub enum Query<N: Network, B: BlockStorage<N>> {
VM(BlockStore<N, B>),
REST(String),
}
Variants§
Implementations§
source§impl<N: Network, B: BlockStorage<N>> Query<N, B>
impl<N: Network, B: BlockStorage<N>> Query<N, B>
sourcepub fn get_program(&self, program_id: &ProgramID<N>) -> Result<Program<N>>
pub fn get_program(&self, program_id: &ProgramID<N>) -> Result<Program<N>>
Returns the program for the given program ID.
Trait Implementations§
source§impl<N: Network, B: BlockStorage<N>> From<&BlockStore<N, B>> for Query<N, B>
impl<N: Network, B: BlockStorage<N>> From<&BlockStore<N, B>> for Query<N, B>
source§fn from(block_store: &BlockStore<N, B>) -> Self
fn from(block_store: &BlockStore<N, B>) -> Self
Converts to this type from the input type.
source§impl<N: Network, B: BlockStorage<N>> From<BlockStore<N, B>> for Query<N, B>
impl<N: Network, B: BlockStorage<N>> From<BlockStore<N, B>> for Query<N, B>
source§fn from(block_store: BlockStore<N, B>) -> Self
fn from(block_store: BlockStore<N, B>) -> Self
Converts to this type from the input type.
source§impl<N: Network, B: BlockStorage<N>> QueryTrait<N> for Query<N, B>
impl<N: Network, B: BlockStorage<N>> QueryTrait<N> for Query<N, B>
source§fn current_state_root(&self) -> Result<N::StateRoot>
fn current_state_root(&self) -> Result<N::StateRoot>
Returns the current state root.
source§fn get_state_path_for_commitment(
&self,
commitment: &Field<N>
) -> Result<StatePath<N>>
fn get_state_path_for_commitment( &self, commitment: &Field<N> ) -> Result<StatePath<N>>
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