pub struct ErrorObject {
pub code: Option<String>,
pub detail: Option<String>,
pub id: Option<String>,
pub links: Map<Key, Link>,
pub meta: Map,
pub source: Option<ErrorSource>,
pub status: Option<StatusCode>,
pub title: Option<String>,
/* private fields */
}Expand description
Contains information about problems encountered while performing an operation.
For more information, check out the error objects section of the JSON API specification.
Fields§
§code: Option<String>An application-specific error code, expressed as a string value.
detail: Option<String>A human-readable explanation specific to this occurrence of the problem.
id: Option<String>A unique identifier for this particular occurrence of the problem.
links: Map<Key, Link>Contains relevant links. If this value of this field is empty, it will not be serialized. For more information, check out the links section of the JSON API specification.
meta: MapNon-standard meta information. If this value of this field is empty, it will not be serialized. For more information, check out the meta information section of the JSON API specification.
source: Option<ErrorSource>The source of the error.
status: Option<StatusCode>The HTTP status code applicable to this problem.
title: Option<String>A short, human-readable summary of the problem.
Implementations§
Source§impl ErrorObject
impl ErrorObject
Sourcepub fn new(status: Option<StatusCode>) -> Self
pub fn new(status: Option<StatusCode>) -> Self
Returns a new ErrorObject with the specified status.
Trait Implementations§
Source§impl Clone for ErrorObject
impl Clone for ErrorObject
Source§fn clone(&self) -> ErrorObject
fn clone(&self) -> ErrorObject
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ErrorObject
impl Debug for ErrorObject
Source§impl Default for ErrorObject
impl Default for ErrorObject
Source§fn default() -> ErrorObject
fn default() -> ErrorObject
Source§impl<'de> Deserialize<'de> for ErrorObject
impl<'de> Deserialize<'de> for ErrorObject
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>,
Source§impl PartialEq for ErrorObject
impl PartialEq for ErrorObject
Source§fn eq(&self, other: &ErrorObject) -> bool
fn eq(&self, other: &ErrorObject) -> bool
self and other values to be equal, and is used by ==.