Enum diem_sdk::client::MethodResponse
pub enum MethodResponse {
Show 16 variants
Submit,
GetMetadata(MetadataView),
GetAccount(Option<AccountView>),
GetTransactions(Vec<TransactionView, Global>),
GetAccountTransaction(Option<TransactionView>),
GetAccountTransactions(Vec<TransactionView, Global>),
GetEvents(Vec<EventView, Global>),
GetCurrencies(Vec<CurrencyInfoView, Global>),
GetNetworkStatus(u64),
GetStateProof(StateProofView),
GetAccumulatorConsistencyProof(AccumulatorConsistencyProofView),
GetAccountStateWithProof(AccountStateWithProofView),
GetTransactionsWithProofs(Option<TransactionsWithProofsView>),
GetAccountTransactionsWithProofs(AccountTransactionsWithProofView),
GetEventsWithProofs(Vec<EventWithProofView, Global>),
GetEventByVersionWithProof(EventByVersionWithProofView),
}
Variants§
Submit
GetMetadata(MetadataView)
GetAccount(Option<AccountView>)
GetTransactions(Vec<TransactionView, Global>)
GetAccountTransaction(Option<TransactionView>)
GetAccountTransactions(Vec<TransactionView, Global>)
GetEvents(Vec<EventView, Global>)
GetCurrencies(Vec<CurrencyInfoView, Global>)
GetNetworkStatus(u64)
GetStateProof(StateProofView)
GetAccumulatorConsistencyProof(AccumulatorConsistencyProofView)
GetAccountStateWithProof(AccountStateWithProofView)
GetTransactionsWithProofs(Option<TransactionsWithProofsView>)
GetAccountTransactionsWithProofs(AccountTransactionsWithProofView)
GetEventsWithProofs(Vec<EventWithProofView, Global>)
GetEventByVersionWithProof(EventByVersionWithProofView)
Implementations§
§impl MethodResponse
impl MethodResponse
pub fn from_json(method: Method, json: Value) -> Result<MethodResponse, Error>
pub fn method(&self) -> Method
pub fn unwrap_get_account(self) -> Option<AccountView>
pub fn try_into_submit(self) -> Result<(), Error>
pub fn try_into_get_metadata(self) -> Result<MetadataView, Error>
pub fn try_into_get_state_proof(self) -> Result<StateProofView, Error>
pub fn try_into_get_accumulator_consistency_proof( self ) -> Result<AccumulatorConsistencyProofView, Error>
pub fn try_into_get_account(self) -> Result<Option<AccountView>, Error>
pub fn try_into_get_transactions( self ) -> Result<Vec<TransactionView, Global>, Error>
pub fn try_into_get_account_transaction( self ) -> Result<Option<TransactionView>, Error>
pub fn try_into_get_account_transactions( self ) -> Result<Vec<TransactionView, Global>, Error>
pub fn try_into_get_account_state_with_proof( self ) -> Result<AccountStateWithProofView, Error>
pub fn try_into_get_events(self) -> Result<Vec<EventView, Global>, Error>
pub fn try_into_get_event_by_version_with_proof( self ) -> Result<EventByVersionWithProofView, Error>
pub fn try_into_get_currencies( self ) -> Result<Vec<CurrencyInfoView, Global>, Error>
pub fn try_into_get_network_status(self) -> Result<u64, Error>
Trait Implementations§
§impl Clone for MethodResponse
impl Clone for MethodResponse
§fn clone(&self) -> MethodResponse
fn clone(&self) -> MethodResponse
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 more§impl Debug for MethodResponse
impl Debug for MethodResponse
§impl PartialEq<MethodResponse> for MethodResponse
impl PartialEq<MethodResponse> for MethodResponse
§fn eq(&self, other: &MethodResponse) -> bool
fn eq(&self, other: &MethodResponse) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.