pub struct FnMiddleware<F, S, St, Req, In, Out, Err> { /* private fields */ }Expand description
Middleware backed by an asynchronous function.
Trait Implementations§
Source§impl<F, S, St, Req, In, Out, Err> Clone for FnMiddleware<F, S, St, Req, In, Out, Err>where
F: Clone,
impl<F, S, St, Req, In, Out, Err> Clone for FnMiddleware<F, S, St, Req, In, Out, Err>where
F: Clone,
Source§impl<F, S, St, Req, In, Out, Err> Debug for FnMiddleware<F, S, St, Req, In, Out, Err>
impl<F, S, St, Req, In, Out, Err> Debug for FnMiddleware<F, S, St, Req, In, Out, Err>
Source§impl<F, S, St, Req, In, Out, Err> Middleware<S, St> for FnMiddleware<F, S, St, Req, In, Out, Err>
impl<F, S, St, Req, In, Out, Err> Middleware<S, St> for FnMiddleware<F, S, St, Req, In, Out, Err>
Source§fn create(&self, _: &St, service: S) -> Self::Service
fn create(&self, _: &St, service: S) -> Self::Service
Creates and returns a new middleware service.
Source§fn apply_to<Sf, Req>(
self,
factory: Sf,
) -> ServiceChainFactory<ApplyMiddleware<Self, Sf>, St, Req>
fn apply_to<Sf, Req>( self, factory: Sf, ) -> ServiceChainFactory<ApplyMiddleware<Self, Sf>, St, Req>
Creates a service factory that instantiates a service and applies
the current middleware to it. Read more
Auto Trait Implementations§
impl<F, S, St, Req, In, Out, Err> Freeze for FnMiddleware<F, S, St, Req, In, Out, Err>where
F: Freeze,
impl<F, S, St, Req, In, Out, Err> RefUnwindSafe for FnMiddleware<F, S, St, Req, In, Out, Err>where
F: RefUnwindSafe,
impl<F, S, St, Req, In, Out, Err> Send for FnMiddleware<F, S, St, Req, In, Out, Err>where
F: Send,
impl<F, S, St, Req, In, Out, Err> Sync for FnMiddleware<F, S, St, Req, In, Out, Err>where
F: Sync,
impl<F, S, St, Req, In, Out, Err> Unpin for FnMiddleware<F, S, St, Req, In, Out, Err>where
F: Unpin,
impl<F, S, St, Req, In, Out, Err> UnsafeUnpin for FnMiddleware<F, S, St, Req, In, Out, Err>where
F: UnsafeUnpin,
impl<F, S, St, Req, In, Out, Err> UnwindSafe for FnMiddleware<F, S, St, Req, In, Out, Err>where
F: UnwindSafe,
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