pub struct ProblemJson { /* private fields */ }Expand description
Middleware that rewrites non-JSON 4xx/5xx responses into problem+json.
Implementations§
Source§impl ProblemJson
impl ProblemJson
Sourcepub fn client_errors(self, on: bool) -> Self
pub fn client_errors(self, on: bool) -> Self
Toggles 4xx → problem+json conversion.
Sourcepub fn server_errors(self, on: bool) -> Self
pub fn server_errors(self, on: bool) -> Self
Toggles 5xx → problem+json conversion.
Trait Implementations§
Source§impl Default for ProblemJson
impl Default for ProblemJson
Auto Trait Implementations§
impl Freeze for ProblemJson
impl RefUnwindSafe for ProblemJson
impl Send for ProblemJson
impl Sync for ProblemJson
impl Unpin for ProblemJson
impl UnsafeUnpin for ProblemJson
impl UnwindSafe for ProblemJson
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