pub struct ErrorBody {
pub code: String,
pub message: String,
pub detail: Option<Value>,
}Expand description
Canonical JSON body for all subc-generated ERROR frames.
detail is an optional machine-parsable surface for refusals whose remedy
needs more than a code (e.g. a producer-published backoff number, an
observed-vs-configured size pair). Absent detail serializes to nothing, so
bodies without it are byte-identical to the pre-detail wire and older
readers simply never see the field. Producers document each code’s detail
fields where the code is defined; detail must never carry secrets.
Fields§
§code: String§message: String§detail: Option<Value>Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ErrorBody
impl<'de> Deserialize<'de> for ErrorBody
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 ErrorBody
Auto Trait Implementations§
impl Freeze for ErrorBody
impl RefUnwindSafe for ErrorBody
impl Send for ErrorBody
impl Sync for ErrorBody
impl Unpin for ErrorBody
impl UnsafeUnpin for ErrorBody
impl UnwindSafe for ErrorBody
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