Struct terra_rust_api::Terra[][src]

pub struct Terra<'a> {
    pub chain_id: &'a str,
    pub gas_options: Option<&'a GasOptions>,
    // some fields omitted
}

The main structure that all API calls are generated from

Fields

chain_id: &'a str

The Chain of the network

gas_options: Option<&'a GasOptions>

Gas Options used to help with gas/fee generation of transactions

Implementations

impl<'a> Terra<'_>[src]

pub async fn lcd_client(
    url: &'a str,
    chain_id: &'a str,
    gas_options: &'a GasOptions
) -> Result<Terra<'a>>
[src]

Create a FULL client interface

pub async fn lcd_client_no_tx(
    url: &'a str,
    chain_id: &'a str
) -> Result<Terra<'a>>
[src]

Create a read-only / query client interface

pub fn auth(&self) -> Auth<'_>[src]

Auth API functions

pub fn staking(&self) -> Staking<'_>[src]

Staking API functions

pub fn market(&self) -> Market<'_>[src]

Market API functions

pub fn oracle(&self) -> Oracle<'_>[src]

Oracle API functions

pub fn tendermint(&self) -> Tendermint<'_>[src]

Tendermint (MISC) API Functions

pub fn tx(&self) -> TX<'_>[src]

TXS API Functions

pub async fn send_cmd<T: for<'de> Deserialize<'de>>(
    &self,
    path: &str,
    args: Option<&str>
) -> Result<T>
[src]

used to send a GET command to the LCD

pub async fn post_cmd<R: for<'de> Serialize, T: for<'de> Deserialize<'de>>(
    &self,
    path: &str,
    args: &R
) -> Result<T>
[src]

used to send a POST with a JSON body to the LCD

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Terra<'a>

impl<'a> Send for Terra<'a>

impl<'a> Sync for Terra<'a>

impl<'a> Unpin for Terra<'a>

impl<'a> !UnwindSafe for Terra<'a>

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.