pub struct CorsService<S> { /* private fields */ }Expand description
Decorates a service, providing an implementation of the CORS specification.
Trait Implementations§
Source§impl<S: Debug> Debug for CorsService<S>
impl<S: Debug> Debug for CorsService<S>
Source§impl<S> Service for CorsService<S>where
S: HttpService,
impl<S> Service for CorsService<S>where
S: HttpService,
Source§type Request = Request<<S as HttpService>::RequestBody>
type Request = Request<<S as HttpService>::RequestBody>
Requests handled by the service.
Source§type Response = Response<Option<<S as HttpService>::ResponseBody>>
type Response = Response<Option<<S as HttpService>::ResponseBody>>
Responses given by the service.
Source§type Error = <S as HttpService>::Error
type Error = <S as HttpService>::Error
Errors produced by the service.
Source§type Future = CorsFuture<<S as HttpService>::Future>
type Future = CorsFuture<<S as HttpService>::Future>
The future response value.
Source§fn poll_ready(&mut self) -> Poll<(), Self::Error>
fn poll_ready(&mut self) -> Poll<(), Self::Error>
Returns
Ready when the service is able to process requests. Read moreAuto Trait Implementations§
impl<S> Freeze for CorsService<S>where
S: Freeze,
impl<S> RefUnwindSafe for CorsService<S>where
S: RefUnwindSafe,
impl<S> Send for CorsService<S>where
S: Send,
impl<S> Sync for CorsService<S>where
S: Sync,
impl<S> Unpin for CorsService<S>where
S: Unpin,
impl<S> UnwindSafe for CorsService<S>where
S: UnwindSafe,
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, B1, B2> HttpService for T
impl<T, B1, B2> HttpService for T
Source§type RequestBody = B1
type RequestBody = B1
Request payload.
Source§type ResponseBody = B2
type ResponseBody = B2
The HTTP response body type.
Source§fn poll_http_ready(&mut self) -> Result<Async<()>, <T as Service>::Error>
fn poll_http_ready(&mut self) -> Result<Async<()>, <T as Service>::Error>
Returns
Ready when the service is able to process requests.Source§fn call_http(
&mut self,
request: Request<<T as HttpService>::RequestBody>,
) -> <T as HttpService>::Future
fn call_http( &mut self, request: Request<<T as HttpService>::RequestBody>, ) -> <T as HttpService>::Future
Process the request and return the response asynchronously.
Source§fn lift(self) -> LiftService<Self>where
Self: Sized,
fn lift(self) -> LiftService<Self>where
Self: Sized,
Wraps
self with LiftService. This provides an implementation of
Service for Self.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