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: Map
Non-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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more