pub struct WithMiddleware<A> { /* private fields */ }Expand description
An Application that applies a stack of Middleware layers before
dispatching to an inner application.
Layers are applied in registration order: the first .wrap()ed middleware
runs first on the request path and last on the response path.
Implementations§
Source§impl<A: Application> WithMiddleware<A>
impl<A: Application> WithMiddleware<A>
Sourcepub fn wrap(self, layer: impl Middleware + 'static) -> Self
pub fn wrap(self, layer: impl Middleware + 'static) -> Self
Add a middleware layer. Layers run in registration order.
Trait Implementations§
Source§impl<A: Application> Application for WithMiddleware<A>
impl<A: Application> Application for WithMiddleware<A>
Auto Trait Implementations§
impl<A> !RefUnwindSafe for WithMiddleware<A>
impl<A> !UnwindSafe for WithMiddleware<A>
impl<A> Freeze for WithMiddleware<A>where
A: Freeze,
impl<A> Send for WithMiddleware<A>where
A: Send,
impl<A> Sync for WithMiddleware<A>where
A: Sync,
impl<A> Unpin for WithMiddleware<A>where
A: Unpin,
impl<A> UnsafeUnpin for WithMiddleware<A>where
A: UnsafeUnpin,
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