pub struct CorsMiddleware { /* private fields */ }Expand description
Middleware providing an implementation of the CORS specification.
Trait Implementations§
Source§impl Debug for CorsMiddleware
impl Debug for CorsMiddleware
Source§impl<S> Middleware<S> for CorsMiddlewarewhere
S: HttpService,
impl<S> Middleware<S> for CorsMiddlewarewhere
S: HttpService,
Source§type Request = Request<<S as HttpService>::RequestBody>
type Request = Request<<S as HttpService>::RequestBody>
The wrapped service request type
Source§type Response = Response<Option<<S as HttpService>::ResponseBody>>
type Response = Response<Option<<S as HttpService>::ResponseBody>>
The wrapped service response type
Source§type Error = <S as HttpService>::Error
type Error = <S as HttpService>::Error
The wrapped service’s error type
Source§type Service = CorsService<S>
type Service = CorsService<S>
The wrapped service
Auto Trait Implementations§
impl Freeze for CorsMiddleware
impl RefUnwindSafe for CorsMiddleware
impl Send for CorsMiddleware
impl Sync for CorsMiddleware
impl Unpin for CorsMiddleware
impl UnwindSafe for CorsMiddleware
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, 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