pub struct Identity { /* private fields */ }Expand description
A no-op middleware.
When wrapping a Service, the Identity middleware returns the provided
service without modifying it.
Implementations§
Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, S, B1, B2> HttpMiddleware<S> for Twhere
T: Middleware<S, Request = Request<B1>, Response = Response<B2>>,
B1: BufStream,
B2: BufStream,
impl<T, S, B1, B2> HttpMiddleware<S> for Twhere
T: Middleware<S, Request = Request<B1>, Response = Response<B2>>,
B1: BufStream,
B2: BufStream,
Source§type RequestBody = B1
type RequestBody = B1
The HTTP request body handled by the wrapped service.
Source§type ResponseBody = B2
type ResponseBody = B2
The HTTP response body returned by the wrapped service.
Source§type Error = <T as Middleware<S>>::Error
type Error = <T as Middleware<S>>::Error
The wrapped service’s error type.
Source§type Service = <T as Middleware<S>>::Service
type Service = <T as Middleware<S>>::Service
The wrapped service.
Source§fn wrap_http(&self, inner: S) -> <T as HttpMiddleware<S>>::Service
fn wrap_http(&self, inner: S) -> <T as HttpMiddleware<S>>::Service
Wrap the given service with the middleware, returning a new servicee
that has been decorated with the middleware.
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more