pub struct ErrorObject {
pub id: Option<String>,
pub status: String,
pub code: String,
pub title: String,
pub detail: Option<String>,
pub source: Option<ErrorSource>,
pub meta: Option<BTreeMap<String, Value>>,
}Expand description
A JSON:API error object.
Fields§
§id: Option<String>The correlation id from the current ash-log scope.
status: String§code: String§title: String§detail: Option<String>§source: Option<ErrorSource>§meta: Option<BTreeMap<String, Value>>Non-standard members, which JSON:API confines to meta.
Carries i18n — a Translation key and
its params — when the error was given one, so a client can render the
failure in its own language instead of matching on English detail.
Trait Implementations§
Source§impl Clone for ErrorObject
impl Clone for ErrorObject
Source§impl Debug for ErrorObject
impl Debug for ErrorObject
Source§impl Default for ErrorObject
impl Default for 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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ErrorObject
impl PartialEq for ErrorObject
Source§impl Serialize for ErrorObject
impl Serialize for ErrorObject
impl StructuralPartialEq for ErrorObject
Auto Trait Implementations§
impl Freeze for ErrorObject
impl RefUnwindSafe for ErrorObject
impl Send for ErrorObject
impl Sync for ErrorObject
impl Unpin for ErrorObject
impl UnsafeUnpin for ErrorObject
impl UnwindSafe for ErrorObject
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