[][src]Struct akkorokamui::api::Response

pub struct Response<T> {
    pub error: Vec<String>,
    pub result: Option<T>,
    pub status_code: u16,
}

Kraken API response.

Fields

error: Vec<String>

List of error messages.

result: Option<T>

Result of API call (may not be present if errors occur).

status_code: u16

The response HTTP status code.

Implementations

impl Response<Value>[src]

pub fn get(&self, index: impl Index) -> Option<&Value>[src]

Gets the object at the given index from the response result.

pub fn get_mut(&mut self, index: impl Index) -> Option<&mut Value>[src]

Gets a mutable reference of the object at the given index from the response result.

impl<T> Response<T>[src]

pub fn is_success(&self) -> bool[src]

Returns true only if the Response doesn't contain any error and the HTTP status code is within [200, 299].

Trait Implementations

impl<T: Clone> Clone for Response<T>[src]

impl<T: Debug> Debug for Response<T>[src]

impl<'de, T> Deserialize<'de> for Response<T> where
    T: Deserialize<'de>, 
[src]

impl<T: Eq> Eq for Response<T>[src]

impl<T: PartialEq> PartialEq<Response<T>> for Response<T>[src]

impl<T> Serialize for Response<T> where
    T: Serialize
[src]

impl<T> StructuralEq for Response<T>[src]

impl<T> StructuralPartialEq for Response<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Response<T> where
    T: RefUnwindSafe

impl<T> Send for Response<T> where
    T: Send

impl<T> Sync for Response<T> where
    T: Sync

impl<T> Unpin for Response<T> where
    T: Unpin

impl<T> UnwindSafe for Response<T> where
    T: UnwindSafe

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

impl<T> Instrument 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> 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.