#[non_exhaustive]pub struct ErrorResponse {
pub code: ErrorCode,
pub message: String,
pub detail: Vec<String>,
}Expand description
A failed request: something for a human (message) and something for the
client to branch on (code). Non-exhaustive so a field can be added
without a breaking release: build one with ErrorResponse::new.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.code: ErrorCode§message: String§detail: Vec<String>Sanitised engine diagnostics (path:line:col: severity: message) for a
render_failed, present only when the server opts in
(MDCAST_EXPOSE_DIAGNOSTICS). Omitted when empty, so a body without
it is byte-identical to one from a server that predates the field.
Implementations§
Trait Implementations§
Source§impl Clone for ErrorResponse
impl Clone for ErrorResponse
Source§impl Debug for ErrorResponse
impl Debug for ErrorResponse
Source§impl<'de> Deserialize<'de> for ErrorResponse
impl<'de> Deserialize<'de> for ErrorResponse
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 Eq for ErrorResponse
Source§impl PartialEq for ErrorResponse
impl PartialEq for ErrorResponse
Source§impl Serialize for ErrorResponse
impl Serialize for ErrorResponse
impl StructuralPartialEq for ErrorResponse
Auto Trait Implementations§
impl Freeze for ErrorResponse
impl RefUnwindSafe for ErrorResponse
impl Send for ErrorResponse
impl Sync for ErrorResponse
impl Unpin for ErrorResponse
impl UnsafeUnpin for ErrorResponse
impl UnwindSafe for ErrorResponse
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