pub struct FixedStateRootQuery<N: Network> {
pub state_root: N::StateRoot,
pub block_height: u32,
}Expand description
Custom query returning a fixed state root (bypasses ureq/WAF issues).
Fields§
§state_root: N::StateRoot§block_height: u32Trait Implementations§
Source§impl<N: Network> QueryTrait<N> for FixedStateRootQuery<N>
impl<N: Network> QueryTrait<N> for FixedStateRootQuery<N>
Source§fn current_state_root(&self) -> Result<N::StateRoot>
fn current_state_root(&self) -> Result<N::StateRoot>
Returns the current state root.
Source§fn current_block_height(&self) -> Result<u32>
fn current_block_height(&self) -> Result<u32>
Returns the current block height
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 get_state_paths_for_commitments(
&self,
_commitments: &[Field<N>],
) -> Result<Vec<StatePath<N>>>
fn get_state_paths_for_commitments( &self, _commitments: &[Field<N>], ) -> Result<Vec<StatePath<N>>>
Returns a list of state paths for the given list of
commitments.Source§fn current_state_root_async<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<N::StateRoot>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn current_state_root_async<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<N::StateRoot>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the current state root.
Source§fn current_block_height_async<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u32>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn current_block_height_async<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u32>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the current block height
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>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: '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>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns a state path for the given
commitment.Source§fn get_state_paths_for_commitments_async<'life0, 'life1, 'async_trait>(
&'life0 self,
_commitments: &'life1 [Field<N>],
) -> Pin<Box<dyn Future<Output = Result<Vec<StatePath<N>>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_state_paths_for_commitments_async<'life0, 'life1, 'async_trait>(
&'life0 self,
_commitments: &'life1 [Field<N>],
) -> Pin<Box<dyn Future<Output = Result<Vec<StatePath<N>>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns a list of state paths for the given list of
commitments.Auto Trait Implementations§
impl<N> Freeze for FixedStateRootQuery<N>
impl<N> RefUnwindSafe for FixedStateRootQuery<N>
impl<N> Send for FixedStateRootQuery<N>
impl<N> Sync for FixedStateRootQuery<N>
impl<N> Unpin for FixedStateRootQuery<N>
impl<N> UnsafeUnpin for FixedStateRootQuery<N>
impl<N> UnwindSafe for FixedStateRootQuery<N>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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