pub struct ErrorData {
pub code: String,
pub origin: ErrorOrigin,
pub redirect: Option<RedirectInfo>,
pub extra: Map<String, Value>,
}Expand description
Structured error context carried in error.data.
The canonical DIG envelope always carries data.code (the
UPPER_SNAKE_CASE machine identifier) and
data.origin. redirect is present only on
ContentRedirect; extra carries any
method-specific fields verbatim (flattened onto data).
Fields§
§code: StringThe stable UPPER_SNAKE_CASE machine code (mirrors the numeric code).
origin: ErrorOriginThe subsystem the failure arose in.
redirect: Option<RedirectInfo>The redirect payload — present only on CONTENT_REDIRECT.
extra: Map<String, Value>Any additional method-specific fields, flattened onto data.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ErrorData
impl<'de> Deserialize<'de> for ErrorData
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 ErrorData
Auto Trait Implementations§
impl Freeze for ErrorData
impl RefUnwindSafe for ErrorData
impl Send for ErrorData
impl Sync for ErrorData
impl Unpin for ErrorData
impl UnsafeUnpin for ErrorData
impl UnwindSafe for ErrorData
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