pub struct WireErrorBody {
pub code: String,
pub message: String,
pub details: Option<Value>,
}Fields§
§code: StringError code from the ACDP error registry.
message: StringHuman-readable message.
details: Option<Value>Machine-readable details (e.g. {"reason": "lineage_mismatch"}).
Optional in acdp-error.schema.json and, when present, a JSON
object ("type": "object") — not nullable. de_present_object
rejects an explicit "details": null and any non-object value.
Implementations§
Source§impl WireErrorBody
impl WireErrorBody
Sourcepub fn supersession_reason(&self) -> Option<SupersessionReason>
pub fn supersession_reason(&self) -> Option<SupersessionReason>
Typed accessor for details.reason on superseded_target errors.
Sourcepub fn unreachable_ctx_id(&self) -> Option<&str>
pub fn unreachable_ctx_id(&self) -> Option<&str>
details.unreachable_ctx_id (set on lineage_walk_failed).
Sourcepub fn idempotency_key(&self) -> Option<&str>
pub fn idempotency_key(&self) -> Option<&str>
details.idempotency_key (set on duplicate_publish).
Sourcepub fn original_ctx_id(&self) -> Option<&str>
pub fn original_ctx_id(&self) -> Option<&str>
details.original_ctx_id (set on duplicate_publish).
Trait Implementations§
Source§impl Clone for WireErrorBody
impl Clone for WireErrorBody
Source§fn clone(&self) -> WireErrorBody
fn clone(&self) -> WireErrorBody
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WireErrorBody
impl Debug for WireErrorBody
Source§impl<'de> Deserialize<'de> for WireErrorBody
impl<'de> Deserialize<'de> for WireErrorBody
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<WireErrorBody, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<WireErrorBody, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for WireErrorBody
impl Serialize for WireErrorBody
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for WireErrorBody
impl RefUnwindSafe for WireErrorBody
impl Send for WireErrorBody
impl Sync for WireErrorBody
impl Unpin for WireErrorBody
impl UnsafeUnpin for WireErrorBody
impl UnwindSafe for WireErrorBody
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