pub enum QueryRequest {
ViewAccount {
account_id: AccountId,
},
ViewCode {
account_id: AccountId,
},
ViewState {
account_id: AccountId,
include_proof: Option<bool>,
prefix_base64: StoreKey,
},
ViewAccessKey {
account_id: AccountId,
public_key: PublicKey,
},
ViewAccessKeyList {
account_id: AccountId,
},
CallFunction {
account_id: AccountId,
method_name: String,
args_base64: FunctionArgs,
},
ViewGlobalContractCode {
code_hash: CryptoHash,
},
ViewGlobalContractCodeByAccountId {
account_id: AccountId,
},
}Expand description
Simplified query request structure that eliminates duplication by removing reference types from the enum variants. The reference is provided separately when converting to RPC format.
Variants§
ViewAccount
View account information
ViewCode
View contract code for an account
ViewState
View state of an account with optional proof and key prefix
ViewAccessKey
View a specific access key for an account
ViewAccessKeyList
View all access keys for an account
CallFunction
Call a view function on a contract
ViewGlobalContractCode
View global contract code by hash
Fields
§
code_hash: CryptoHashViewGlobalContractCodeByAccountId
View global contract code by account ID
Implementations§
Source§impl QueryRequest
impl QueryRequest
Sourcepub fn to_rpc_query_request(self, reference: Reference) -> RpcQueryRequest
pub fn to_rpc_query_request(self, reference: Reference) -> RpcQueryRequest
Convert this simplified query request to the OpenAPI RpcQueryRequest enum This method handles the conversion from our unified Reference type to the appropriate OpenAPI variant based on the reference type
Trait Implementations§
Source§impl Clone for QueryRequest
impl Clone for QueryRequest
Source§fn clone(&self) -> QueryRequest
fn clone(&self) -> QueryRequest
Returns a duplicate 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 QueryRequest
impl Debug for QueryRequest
Source§impl<'de> Deserialize<'de> for QueryRequest
impl<'de> Deserialize<'de> for QueryRequest
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
Auto Trait Implementations§
impl Freeze for QueryRequest
impl RefUnwindSafe for QueryRequest
impl Send for QueryRequest
impl Sync for QueryRequest
impl Unpin for QueryRequest
impl UnwindSafe for QueryRequest
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