[][src]Struct libra_secure_json_rpc::JsonRpcClient

pub struct JsonRpcClient { /* fields omitted */ }

Provides a lightweight JsonRpcClient implementation.


impl JsonRpcClient[src]

pub fn new(host: String) -> Self[src]

pub fn submit_transaction(
    signed_transaction: SignedTransaction
) -> Result<(), Error>

Submits a signed transaction to the Libra blockchain. This is done by sending a submit() request to the JSON RPC server using the given transaction.

pub fn get_account_state(
    account: AccountAddress,
    version: Option<u64>
) -> Result<AccountState, Error>

Returns the associated AccountState for a specific account at a given version height. This is done by sending a get_account_state_with_proof() request to the JSON RPC server for the specified account, optional version height and optional ledger_version height (for the proof).

pub fn get_transaction_status(
    account: AccountAddress,
    sequence_number: u64
) -> Result<Option<TransactionView>, Error>

Retrieves the status of a transaction on a given account.

Trait Implementations

impl Clone for JsonRpcClient[src]

Auto Trait Implementations

impl RefUnwindSafe for JsonRpcClient

impl Send for JsonRpcClient

impl Sync for JsonRpcClient

impl Unpin for JsonRpcClient

impl UnwindSafe for JsonRpcClient

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,