Enum diem_client::MethodResponse
source · pub enum MethodResponse {
Show 16 variants
Submit,
GetMetadata(MetadataView),
GetAccount(Option<AccountView>),
GetTransactions(Vec<TransactionView>),
GetAccountTransaction(Option<TransactionView>),
GetAccountTransactions(Vec<TransactionView>),
GetEvents(Vec<EventView>),
GetCurrencies(Vec<CurrencyInfoView>),
GetNetworkStatus(u64),
GetStateProof(StateProofView),
GetAccumulatorConsistencyProof(AccumulatorConsistencyProofView),
GetAccountStateWithProof(AccountStateWithProofView),
GetTransactionsWithProofs(Option<TransactionsWithProofsView>),
GetAccountTransactionsWithProofs(AccountTransactionsWithProofView),
GetEventsWithProofs(Vec<EventWithProofView>),
GetEventByVersionWithProof(EventByVersionWithProofView),
}
Variants§
Submit
GetMetadata(MetadataView)
GetAccount(Option<AccountView>)
GetTransactions(Vec<TransactionView>)
GetAccountTransaction(Option<TransactionView>)
GetAccountTransactions(Vec<TransactionView>)
GetEvents(Vec<EventView>)
GetCurrencies(Vec<CurrencyInfoView>)
GetNetworkStatus(u64)
GetStateProof(StateProofView)
GetAccumulatorConsistencyProof(AccumulatorConsistencyProofView)
GetAccountStateWithProof(AccountStateWithProofView)
GetTransactionsWithProofs(Option<TransactionsWithProofsView>)
GetAccountTransactionsWithProofs(AccountTransactionsWithProofView)
GetEventsWithProofs(Vec<EventWithProofView>)
GetEventByVersionWithProof(EventByVersionWithProofView)
Implementations§
source§impl MethodResponse
impl MethodResponse
pub fn from_json(method: Method, json: Value) -> Result<Self, 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>, Error>
pub fn try_into_get_account_transaction( self ) -> Result<Option<TransactionView>, Error>
pub fn try_into_get_account_transactions( self ) -> Result<Vec<TransactionView>, Error>
pub fn try_into_get_account_state_with_proof( self ) -> Result<AccountStateWithProofView, Error>
pub fn try_into_get_events(self) -> Result<Vec<EventView>, 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>, Error>
pub fn try_into_get_network_status(self) -> Result<u64, Error>
Trait Implementations§
source§impl Clone for MethodResponse
impl Clone for MethodResponse
source§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 moresource§impl Debug for MethodResponse
impl Debug for MethodResponse
source§impl PartialEq<MethodResponse> for MethodResponse
impl PartialEq<MethodResponse> for MethodResponse
source§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 ==
.