pub struct Identity;Expand description
Identity is a middleware.
It returns service without modifications.
Trait Implementations§
Source§impl<S, Cfg> Middleware<S, Cfg> for Identity
impl<S, Cfg> Middleware<S, Cfg> for Identity
Source§fn create(&self, service: S, _: Cfg) -> Self::Service
fn create(&self, service: S, _: 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
impl Copy for Identity
Auto Trait Implementations§
impl Freeze for Identity
impl RefUnwindSafe for Identity
impl Send for Identity
impl Sync for Identity
impl Unpin for Identity
impl UnwindSafe for Identity
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