pub struct APIError {
pub reason: String,
pub message: Option<String>,
pub err_type: Option<String>,
pub detail: Option<Map<String, Value>>,
}
Expand description
Represents an error given by the API, with its specifications.
Fields§
§reason: String
The reason for the error.
message: Option<String>
Optionally, a human-readable message for the error.
err_type: Option<String>
Optionally, a specific type of this error.
detail: Option<Map<String, Value>>
Optionally, any extra details about this error.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for APIError
impl<'de> Deserialize<'de> for APIError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for APIError
Auto Trait Implementations§
impl Freeze for APIError
impl RefUnwindSafe for APIError
impl Send for APIError
impl Sync for APIError
impl Unpin for APIError
impl UnwindSafe for APIError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FetchFrom<T> for T
impl<T> FetchFrom<T> for T
Source§fn fetch_from(_: &Client, t: &T) -> Result<T, Error>
fn fetch_from(_: &Client, t: &T) -> Result<T, Error>
(Sync) Returns a copy of the current instance when attempting to fetch from itself.
In order to re-fetch, see Refetchable
.
§Errors
Never errors; is only a Result
in order to match the trait signature.
Source§fn a_fetch_from<'life0, 'life1, 'async_trait>(
_: &'life0 Client,
t: &'life1 T,
) -> Pin<Box<dyn Future<Output = Result<T, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn a_fetch_from<'life0, 'life1, 'async_trait>(
_: &'life0 Client,
t: &'life1 T,
) -> Pin<Box<dyn Future<Output = Result<T, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
(Async) Returns a copy of the current instance when attempting to fetch from itself.
In order to re-fetch, see Refetchable
.
§Errors
Never errors; is only a Result
in order to match the trait signature.
Source§impl<T, U> FetchInto<U> for T
impl<T, U> FetchInto<U> for T
Source§fn fetch_into(&self, client: &Client) -> Result<U, Error>
fn fetch_into(&self, client: &Client) -> Result<U, Error>
(Sync) Attempts to request to the API and return a new instance of the type being turned
into. Read more
Source§fn a_fetch_into<'life0, 'life1, 'async_trait>(
&'life0 self,
client: &'life1 Client,
) -> Pin<Box<dyn Future<Output = Result<U, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
U: 'async_trait,
T: 'async_trait,
fn a_fetch_into<'life0, 'life1, 'async_trait>(
&'life0 self,
client: &'life1 Client,
) -> Pin<Box<dyn Future<Output = Result<U, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
U: 'async_trait,
T: 'async_trait,
(Async) Attempts to request to the API and return a new instance of the type being turned
into. Read more