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.
Sourcepub async fn get_program_async(
&self,
program_id: &ProgramID<N>,
) -> Result<ProgramCore<N, Instruction<N>, Command<N>>, Error>
pub async fn get_program_async( &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>>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>>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>>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>>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> 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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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