Struct clia_ntex_cors::CorsMiddleware
source · pub struct CorsMiddleware<S> { /* private fields */ }
Expand description
Middleware
for Cross-origin resource sharing support
The Cors struct contains the settings for CORS requests to be validated and for responses to be generated.
Trait Implementations§
source§impl<S: Clone> Clone for CorsMiddleware<S>
impl<S: Clone> Clone for CorsMiddleware<S>
source§fn clone(&self) -> CorsMiddleware<S>
fn clone(&self) -> CorsMiddleware<S>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<S, Err> Service<WebRequest<Err>> for CorsMiddleware<S>where
S: Service<WebRequest<Err>, Response = WebResponse>,
Err: ErrorRenderer,
Err::Container: From<S::Error>,
CorsError: WebResponseError<Err>,
impl<S, Err> Service<WebRequest<Err>> for CorsMiddleware<S>where S: Service<WebRequest<Err>, Response = WebResponse>, Err: ErrorRenderer, Err::Container: From<S::Error>, CorsError: WebResponseError<Err>,
§type Response = WebResponse
type Response = WebResponse
Responses given by the service.
§type Error = <S as Service<WebRequest<Err>>>::Error
type Error = <S as Service<WebRequest<Err>>>::Error
Errors produced by the service when polling readiness or executing call.
§type Future<'f>
where
Self: 'f = Either<Ready<Result<<CorsMiddleware<S> as Service<WebRequest<Err>>>::Response, <S as Service<WebRequest<Err>>>::Error>>, Pin<Box<dyn Future<Output = Result<<CorsMiddleware<S> as Service<WebRequest<Err>>>::Response, <S as Service<WebRequest<Err>>>::Error>> + 'f, Global>>>
type Future<'f> where Self: 'f = Either<Ready<Result<<CorsMiddleware<S> as Service<WebRequest<Err>>>::Response, <S as Service<WebRequest<Err>>>::Error>>, Pin<Box<dyn Future<Output = Result<<CorsMiddleware<S> as Service<WebRequest<Err>>>::Response, <S as Service<WebRequest<Err>>>::Error>> + 'f, Global>>>
The future response value.
source§fn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Returns
Ready
when the service is able to process requests. Read moresource§fn call(&self, req: WebRequest<Err>) -> Self::Future<'_>
fn call(&self, req: WebRequest<Err>) -> Self::Future<'_>
Process the request and return the response asynchronously. Read more
Auto Trait Implementations§
impl<S> !RefUnwindSafe for CorsMiddleware<S>
impl<S> !Send for CorsMiddleware<S>
impl<S> !Sync for CorsMiddleware<S>
impl<S> Unpin for CorsMiddleware<S>where S: Unpin,
impl<S> !UnwindSafe for CorsMiddleware<S>
Blanket Implementations§
§impl<Svc, Req> IntoService<Svc, Req> for Svcwhere
Svc: Service<Req>,
impl<Svc, Req> IntoService<Svc, Req> for Svcwhere Svc: Service<Req>,
§fn into_service(self) -> Svc
fn into_service(self) -> Svc
Convert to a
Service