pub struct DefaultCatch { /* private fields */ }Expand description
The default Catch instance used when none is specified.
This implementation provides basic error handling by generating simple HTTP responses based on the error type.
Implementations§
Source§impl DefaultCatch
impl DefaultCatch
Sourcepub fn new() -> DefaultCatch
pub fn new() -> DefaultCatch
Create a new DefaultCatch instance.
Trait Implementations§
Source§impl Catch for DefaultCatch
Implements Catch by returning an HTTP response with the appropriate status
code.
impl Catch for DefaultCatch
Implements Catch by returning an HTTP response with the appropriate status
code.
The HTTP response will include a basic error message in the response body.
Source§impl Clone for DefaultCatch
impl Clone for DefaultCatch
Source§fn clone(&self) -> DefaultCatch
fn clone(&self) -> DefaultCatch
Returns a duplicate of the value. Read more
1.0.0 · 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 DefaultCatch
impl Debug for DefaultCatch
Source§impl<S> IntoCatch<S> for DefaultCatchwhere
S: Serializer,
impl<S> IntoCatch<S> for DefaultCatchwhere
S: Serializer,
Source§type Catch = DefaultCatch
type Catch = DefaultCatch
The
Catch value being converted toSource§fn into_catch(self) -> Self::Catch
fn into_catch(self) -> Self::Catch
Convert
self into a Catch value.Auto Trait Implementations§
impl Freeze for DefaultCatch
impl RefUnwindSafe for DefaultCatch
impl Send for DefaultCatch
impl Sync for DefaultCatch
impl Unpin for DefaultCatch
impl UnwindSafe for DefaultCatch
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more