pub enum ResponseWrapper<T> {
Success {
result: T,
},
Error {
description: String,
parameters: Option<ResponseParameters>,
},
}
Expand description
All API responses are from this type. Mostly used internal.
Variants§
Success
Fields
§
result: T
Response result.
Request was successful.
Error
Fields
§
parameters: Option<ResponseParameters>
Contains information about why a request was unsuccessful.
Request was unsuccessful.
Trait Implementations§
source§impl<T: Clone> Clone for ResponseWrapper<T>
impl<T: Clone> Clone for ResponseWrapper<T>
source§fn clone(&self) -> ResponseWrapper<T>
fn clone(&self) -> ResponseWrapper<T>
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<T: Debug> Debug for ResponseWrapper<T>
impl<T: Debug> Debug for ResponseWrapper<T>
source§impl<'de, T: Deserialize<'de>> Deserialize<'de> for ResponseWrapper<T>
impl<'de, T: Deserialize<'de>> Deserialize<'de> for ResponseWrapper<T>
source§fn deserialize<D>(deserializer: D) -> Result<ResponseWrapper<T>, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<ResponseWrapper<T>, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T: Hash> Hash for ResponseWrapper<T>
impl<T: Hash> Hash for ResponseWrapper<T>
source§impl<T: Ord> Ord for ResponseWrapper<T>
impl<T: Ord> Ord for ResponseWrapper<T>
source§fn cmp(&self, other: &ResponseWrapper<T>) -> Ordering
fn cmp(&self, other: &ResponseWrapper<T>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T: PartialEq> PartialEq<ResponseWrapper<T>> for ResponseWrapper<T>
impl<T: PartialEq> PartialEq<ResponseWrapper<T>> for ResponseWrapper<T>
source§fn eq(&self, other: &ResponseWrapper<T>) -> bool
fn eq(&self, other: &ResponseWrapper<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T: PartialOrd> PartialOrd<ResponseWrapper<T>> for ResponseWrapper<T>
impl<T: PartialOrd> PartialOrd<ResponseWrapper<T>> for ResponseWrapper<T>
source§fn partial_cmp(&self, other: &ResponseWrapper<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &ResponseWrapper<T>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more