Struct json_api::doc::ErrorObject
[−]
[src]
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>, // some fields omitted }
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.
Methods
impl ErrorObject
[src]
fn new(status: Option<StatusCode>) -> Self
[src]
Returns a new ErrorObject
with the specified status
.
Trait Implementations
impl Clone for ErrorObject
[src]
fn clone(&self) -> ErrorObject
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for ErrorObject
[src]
impl Default for ErrorObject
[src]
fn default() -> ErrorObject
[src]
Returns the "default value" for a type. Read more
impl PartialEq for ErrorObject
[src]
fn eq(&self, __arg_0: &ErrorObject) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ErrorObject) -> bool
[src]
This method tests for !=
.