pub struct RenderedError {
pub status: u16,
pub message: String,
pub details: Option<Value>,
pub disclosable: bool,
}Expand description
Marks a response as having been rendered from a framework Error, and
carries the parts needed to render it differently.
Without this, the HTTP kernel could not tell a JSON error body it produced from one a handler deliberately returned, and so could not offer a browser an HTML error page instead. Attached to the response’s extensions, so it never reaches the client.
Fields§
§status: u16The status the error rendered as.
message: StringThe human-readable message.
details: Option<Value>The structured details, if any.
disclosable: boolWhether the message is safe to show a client.
false for 5xx: an internal error’s message routinely contains a
connection string, a file path or a query. The kernel substitutes a
generic message unless the application is in debug mode.
Trait Implementations§
Source§impl Clone for RenderedError
impl Clone for RenderedError
Auto Trait Implementations§
impl Freeze for RenderedError
impl RefUnwindSafe for RenderedError
impl Send for RenderedError
impl Sync for RenderedError
impl Unpin for RenderedError
impl UnsafeUnpin for RenderedError
impl UnwindSafe for RenderedError
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