Struct HandleErrorLayer
pub struct HandleErrorLayer<F, T> { /* private fields */ }
Layer that applies HandleError which is a Service adapter
that handles errors by converting them into responses.
See module docs for more details on axum's error handling model.
Implementations
impl<F, T> HandleErrorLayer<F, T>
fn new(f: F) -> SelfCreate a new
HandleErrorLayer.
Trait Implementations
impl<F, E> Debug for HandleErrorLayer<F, E>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<F, T> Clone for HandleErrorLayer<F, T>
where
F: Clone,
fn clone(&self) -> Self
impl<S, F, T> Layer<S> for HandleErrorLayer<F, T>
where
F: Clone,
type Service = HandleError<S, F, T>;fn layer(&self, inner: S) -> Self::Service
Auto Trait Implementations
impl<F, T> Freeze for HandleErrorLayer<F, T>
where
F: Freeze,
PhantomData<fn() -> T>: Freeze,
impl<F, T> RefUnwindSafe for HandleErrorLayer<F, T>
where
F: RefUnwindSafe,
PhantomData<fn() -> T>: RefUnwindSafe,
impl<F, T> Send for HandleErrorLayer<F, T>
where
F: Send,
PhantomData<fn() -> T>: Send,
impl<F, T> Sync for HandleErrorLayer<F, T>
where
F: Sync,
PhantomData<fn() -> T>: Sync,
impl<F, T> Unpin for HandleErrorLayer<F, T>
where
F: Unpin,
PhantomData<fn() -> T>: Unpin,
impl<F, T> UnsafeUnpin for HandleErrorLayer<F, T>
where
F: UnsafeUnpin,
PhantomData<fn() -> T>: UnsafeUnpin,
impl<F, T> UnwindSafe for HandleErrorLayer<F, T>
where
F: UnwindSafe,
PhantomData<fn() -> T>: UnwindSafe,
Blanket Implementations
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for HandleErrorLayer<F, T>
where
ST: ?Sized,
DT: ?Sized,
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for HandleErrorLayer<F, T>
where
ST: ?Sized,
DT: ?Sized,
impl<T> Any for HandleErrorLayer<F, T>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for HandleErrorLayer<F, T>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for HandleErrorLayer<F, T>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for HandleErrorLayer<F, T>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for HandleErrorLayer<F, T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> FromRef<T> for HandleErrorLayer<F, T>
where
T: Clone,
fn from_ref(input: &T) -> T
impl<T> Instrument for HandleErrorLayer<F, T>
impl<T> Read<Exclusive, BecauseExclusive> for HandleErrorLayer<F, T>
where
T: ?Sized,
impl<T> Same for HandleErrorLayer<F, T>
type Output = T;
impl<T> ToOwned for HandleErrorLayer<F, T>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> WithSubscriber for HandleErrorLayer<F, T>
impl<T, U> Into<U> for HandleErrorLayer<F, T>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for HandleErrorLayer<F, T>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for HandleErrorLayer<F, T>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<V, T> VZip<V> for HandleErrorLayer<F, T>
where
V: MultiLane<T>,
fn vzip(self) -> V