pub struct ErrorDetail {
pub kind: Option<ErrorKind>,
pub model: Option<String>,
pub field: Option<String>,
pub expected_type: Option<String>,
pub actual_wire_type: Option<String>,
pub raw_value: Option<String>,
pub context: BTreeMap<String, String>,
}Expand description
The structured, recoverable payload a Failure carries (scp-error.md).
The leaf produces this; the runtime only transports it — it never synthesizes or infers a
field. Every field except kind is optional: absent means not applicable, never unknown,
defaulted.
expected_type is a PortableType in Portable Type Notation (portable_type_notation), not a
serialized type object: it is a rendering of a statically declared type, so a codegen target bakes
it as a literal and nothing walks a type at runtime.
Fields§
§kind: Option<ErrorKind>§model: Option<String>The declaring model / component.
field: Option<String>The offending field / port.
expected_type: Option<String>The declared type, in Portable Type Notation.
actual_wire_type: Option<String>The wire type actually observed (the producer’s own vocabulary).
raw_value: Option<String>The offending value, stringified (never re-parsed to recover a type).
context: BTreeMap<String, String>Caller context (e.g. the item key that located the datum). Ordered for determinism.
Trait Implementations§
Source§impl Clone for ErrorDetail
impl Clone for ErrorDetail
Source§fn clone(&self) -> ErrorDetail
fn clone(&self) -> ErrorDetail
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 ErrorDetail
impl Debug for ErrorDetail
Source§impl Default for ErrorDetail
impl Default for ErrorDetail
Source§fn default() -> ErrorDetail
fn default() -> ErrorDetail
impl Eq for ErrorDetail
Source§impl PartialEq for ErrorDetail
impl PartialEq for ErrorDetail
impl StructuralPartialEq for ErrorDetail
Auto Trait Implementations§
impl Freeze for ErrorDetail
impl RefUnwindSafe for ErrorDetail
impl Send for ErrorDetail
impl Sync for ErrorDetail
impl Unpin for ErrorDetail
impl UnsafeUnpin for ErrorDetail
impl UnwindSafe for ErrorDetail
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.