[][src]Struct lisk_api_rust_client::http::client::Client

pub struct Client {
    pub host: String,
    // some fields omitted
}

Fields

host: String

Methods

impl Client[src]

pub fn new(host: &str) -> Client[src]

pub fn get<T: DeserializeOwned>(&self, endpoint: &str) -> Result<T>[src]

pub fn get_with_params<T, I, K, V>(
    &self,
    endpoint: &str,
    parameters: I
) -> Result<T> where
    T: DeserializeOwned,
    I: IntoIterator,
    I::Item: Borrow<(K, V)>,
    K: AsRef<str>,
    V: AsRef<str>, 
[src]

pub fn post<T, V>(
    &self,
    endpoint: &str,
    payload: Option<HashMap<&str, V>>
) -> Result<T> where
    T: DeserializeOwned,
    V: Serialize
[src]

pub fn post_with_params<T, H, I, K, V>(
    &self,
    endpoint: &str,
    payload: Option<HashMap<&str, H>>,
    parameters: I
) -> Result<T> where
    T: DeserializeOwned,
    H: Serialize,
    I: IntoIterator,
    I::Item: Borrow<(K, V)>,
    K: AsRef<str>,
    V: AsRef<str>, 
[src]

Trait Implementations

impl Clone for Client[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Client[src]

Auto Trait Implementations

impl Send for Client

impl Sync for Client

Blanket Implementations

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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

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

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

impl<T> Erased for T

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

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