pub struct MiddlewareChain { /* private fields */ }Implementations§
Source§impl MiddlewareChain
impl MiddlewareChain
pub fn new(middlewares: Vec<Middleware>) -> Self
Sourcepub fn single(middleware: Middleware) -> Self
pub fn single(middleware: Middleware) -> Self
Convenience method for single middleware
Trait Implementations§
Source§impl Clone for MiddlewareChain
impl Clone for MiddlewareChain
Source§fn clone(&self) -> MiddlewareChain
fn clone(&self) -> MiddlewareChain
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<S, Cfg> Middleware<S, Cfg> for MiddlewareChain
impl<S, Cfg> Middleware<S, Cfg> for MiddlewareChain
Source§type Service = MiddlewareChainInternal<S>
type Service = MiddlewareChainInternal<S>
The middleware
Service value created by this factorySource§fn create(&self, service: S, _cfg: Cfg) -> Self::Service
fn create(&self, service: S, _cfg: Cfg) -> Self::Service
Creates and returns a new middleware service.
Source§fn apply<Fac, Req>(
self,
factory: Fac,
) -> ServiceChainFactory<ApplyMiddleware<Self, Fac, Cfg>, Req, Cfg>where
Fac: ServiceFactory<Req, Cfg, Service = Svc>,
Cfg: Clone,
Self: Sized,
Self::Service: Service<Req>,
fn apply<Fac, Req>(
self,
factory: Fac,
) -> ServiceChainFactory<ApplyMiddleware<Self, Fac, Cfg>, Req, Cfg>where
Fac: ServiceFactory<Req, Cfg, Service = Svc>,
Cfg: Clone,
Self: Sized,
Self::Service: Service<Req>,
Creates a service factory that instantiates a service and applies
the current middleware to it. Read more
Auto Trait Implementations§
impl Freeze for MiddlewareChain
impl !RefUnwindSafe for MiddlewareChain
impl !Send for MiddlewareChain
impl !Sync for MiddlewareChain
impl Unpin for MiddlewareChain
impl UnsafeUnpin for MiddlewareChain
impl !UnwindSafe for MiddlewareChain
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