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
.
Source§fn current_block_height(&self) -> Result<u32>
fn current_block_height(&self) -> Result<u32>
Returns a state path for the given commitment
.
Auto Trait Implementations§
impl<N, B> Freeze for Query<N, B>where
B: Freeze,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more