pub struct Stack<Inner, Outer> { /* private fields */ }Expand description
Two middleware values applied in sequence.
The inner middleware is applied first, then the outer middleware wraps its service.
Implementations§
Trait Implementations§
Source§impl<S, St, Inner, Outer> Middleware<S, St> for Stack<Inner, Outer>
impl<S, St, Inner, Outer> Middleware<S, St> for Stack<Inner, Outer>
Source§type Service = <Outer as Middleware<<Inner as Middleware<S, St>>::Service, St>>::Service
type Service = <Outer as Middleware<<Inner as Middleware<S, St>>::Service, St>>::Service
Service created by this middleware.
Source§fn create(&self, st: &St, service: S) -> Self::Service
fn create(&self, st: &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<Inner, Outer> Freeze for Stack<Inner, Outer>
impl<Inner, Outer> RefUnwindSafe for Stack<Inner, Outer>where
Inner: RefUnwindSafe,
Outer: RefUnwindSafe,
impl<Inner, Outer> Send for Stack<Inner, Outer>
impl<Inner, Outer> Sync for Stack<Inner, Outer>
impl<Inner, Outer> Unpin for Stack<Inner, Outer>
impl<Inner, Outer> UnsafeUnpin for Stack<Inner, Outer>where
Inner: UnsafeUnpin,
Outer: UnsafeUnpin,
impl<Inner, Outer> UnwindSafe for Stack<Inner, Outer>where
Inner: UnwindSafe,
Outer: 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