pub struct Identity;Expand description
Middleware that returns the wrapped service unchanged.
Construction ignores state and returns the exact input service without
adding a wrapper, readiness cache, or lifecycle behavior. This is useful as
a default middleware or a no-op component of a Stack.
Trait Implementations§
impl Copy for Identity
Source§impl<S, St> Middleware<S, St> for Identity
impl<S, St> Middleware<S, St> for Identity
Source§type Service = S
type Service = S
Wrapper returned by
Self::create. Read moreSource§fn create(&self, _: &St, service: S) -> <Identity as Middleware<S, St>>::Service
fn create(&self, _: &St, service: S) -> <Identity as Middleware<S, St>>::Service
Wraps
service using the supplied construction state. Read moreSource§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 Freeze for Identity
impl RefUnwindSafe for Identity
impl Send for Identity
impl Sync for Identity
impl Unpin for Identity
impl UnsafeUnpin for Identity
impl UnwindSafe for Identity
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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