Struct axum::middleware::FromFnLayer
source · [−]pub struct FromFnLayer<F> { /* private fields */ }
Expand description
A tower::Layer
from an async function.
tower::Layer
is used to apply middleware to Router
’s.
Created with from_fn
. See that function for more details.
Trait Implementations
sourceimpl<F: Clone> Clone for FromFnLayer<F>
impl<F: Clone> Clone for FromFnLayer<F>
sourcefn clone(&self) -> FromFnLayer<F>
fn clone(&self) -> FromFnLayer<F>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<F> Debug for FromFnLayer<F>
impl<F> Debug for FromFnLayer<F>
sourceimpl<S, F> Layer<S> for FromFnLayer<F> where
F: Clone,
impl<S, F> Layer<S> for FromFnLayer<F> where
F: Clone,
impl<F: Copy> Copy for FromFnLayer<F>
Auto Trait Implementations
impl<F> RefUnwindSafe for FromFnLayer<F> where
F: RefUnwindSafe,
impl<F> Send for FromFnLayer<F> where
F: Send,
impl<F> Sync for FromFnLayer<F> where
F: Sync,
impl<F> Unpin for FromFnLayer<F> where
F: Unpin,
impl<F> UnwindSafe for FromFnLayer<F> where
F: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more