Struct aleo_wasm::programs::offline_query::OfflineQuery
source · pub struct OfflineQuery { /* private fields */ }
Expand description
An offline query object used to insert the global state root and state paths needed to create a valid inclusion proof offline.
Implementations§
source§impl OfflineQuery
impl OfflineQuery
sourcepub fn new(state_root: &str) -> Result<OfflineQuery, String>
pub fn new(state_root: &str) -> Result<OfflineQuery, String>
Creates a new offline query object. The state root is required to be passed in as a string
sourcepub fn add_state_path(
&mut self,
commitment: &str,
state_path: &str
) -> Result<(), String>
pub fn add_state_path( &mut self, commitment: &str, state_path: &str ) -> Result<(), String>
Add a new state path to the offline query object.
@param {string} commitment: The commitment corresponding to a record inpout @param {string} state_path: The state path corresponding to the commitment
sourcepub fn from_string(s: &str) -> Result<OfflineQuery, String>
pub fn from_string(s: &str) -> Result<OfflineQuery, String>
Create an offline query object from a json string representation
Trait Implementations§
source§impl Clone for OfflineQuery
impl Clone for OfflineQuery
source§fn clone(&self) -> OfflineQuery
fn clone(&self) -> OfflineQuery
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for OfflineQuery
impl Debug for OfflineQuery
source§impl<'de> Deserialize<'de> for OfflineQuery
impl<'de> Deserialize<'de> for OfflineQuery
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<OfflineQuery> for JsValue
impl From<OfflineQuery> for JsValue
source§fn from(value: OfflineQuery) -> Self
fn from(value: OfflineQuery) -> Self
Converts to this type from the input type.
source§impl FromWasmAbi for OfflineQuery
impl FromWasmAbi for OfflineQuery
source§impl IntoWasmAbi for OfflineQuery
impl IntoWasmAbi for OfflineQuery
source§impl LongRefFromWasmAbi for OfflineQuery
impl LongRefFromWasmAbi for OfflineQuery
source§impl OptionFromWasmAbi for OfflineQuery
impl OptionFromWasmAbi for OfflineQuery
source§impl OptionIntoWasmAbi for OfflineQuery
impl OptionIntoWasmAbi for OfflineQuery
source§impl PartialEq for OfflineQuery
impl PartialEq for OfflineQuery
source§fn eq(&self, other: &OfflineQuery) -> bool
fn eq(&self, other: &OfflineQuery) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl QueryTrait<Testnet3> for OfflineQuery
impl QueryTrait<Testnet3> for OfflineQuery
source§fn current_state_root(&self) -> Result<<Testnet3 as Network>::StateRoot>
fn current_state_root(&self) -> Result<<Testnet3 as Network>::StateRoot>
Returns the current state root.
source§fn current_state_root_async<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<<Testnet3 as Network>::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<<Testnet3 as Network>::StateRoot>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Returns the current state root.
source§fn get_state_path_for_commitment(
&self,
commitment: &Field<Testnet3>
) -> Result<StatePath<Testnet3>>
fn get_state_path_for_commitment( &self, commitment: &Field<Testnet3> ) -> Result<StatePath<Testnet3>>
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<Testnet3>
) -> Pin<Box<dyn Future<Output = Result<StatePath<Testnet3>>> + '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<Testnet3> ) -> Pin<Box<dyn Future<Output = Result<StatePath<Testnet3>>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Returns a state path for the given
commitment
.source§impl RefFromWasmAbi for OfflineQuery
impl RefFromWasmAbi for OfflineQuery
§type Anchor = Ref<'static, OfflineQuery>
type Anchor = Ref<'static, OfflineQuery>
The type that holds the reference to
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.source§impl RefMutFromWasmAbi for OfflineQuery
impl RefMutFromWasmAbi for OfflineQuery
source§impl Serialize for OfflineQuery
impl Serialize for OfflineQuery
source§impl TryFromJsValue for OfflineQuery
impl TryFromJsValue for OfflineQuery
source§impl VectorFromWasmAbi for OfflineQuery
impl VectorFromWasmAbi for OfflineQuery
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[OfflineQuery]>
source§impl VectorIntoWasmAbi for OfflineQuery
impl VectorIntoWasmAbi for OfflineQuery
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[OfflineQuery]>) -> Self::Abi
source§impl WasmDescribeVector for OfflineQuery
impl WasmDescribeVector for OfflineQuery
impl Eq for OfflineQuery
impl StructuralEq for OfflineQuery
impl StructuralPartialEq for OfflineQuery
Auto Trait Implementations§
impl RefUnwindSafe for OfflineQuery
impl Send for OfflineQuery
impl Sync for OfflineQuery
impl Unpin for OfflineQuery
impl UnwindSafe for OfflineQuery
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<'de, T> DeserializeExt<'de> for Twhere
T: DeserializeOwned,
impl<'de, T> DeserializeExt<'de> for Twhere T: DeserializeOwned,
fn take_from_value<D>( value: &mut Value, field: &str ) -> Result<T, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere T: IntoWasmAbi,
§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.