pub struct CorsMiddleware { /* private fields */ }Implementations§
Source§impl CorsMiddleware
impl CorsMiddleware
pub fn new() -> Self
pub fn allow_origins(self, origins: Vec<String>) -> Self
pub fn allow_methods(self, methods: Vec<String>) -> Self
pub fn allow_headers(self, headers: Vec<String>) -> Self
pub fn allow_credentials(self, allow: bool) -> Self
pub fn max_age(self, age: u32) -> Self
Trait Implementations§
Source§impl Default for CorsMiddleware
impl Default for CorsMiddleware
Source§impl Middleware for CorsMiddleware
impl Middleware for CorsMiddleware
fn before_request<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn after_response<'life0, 'life1, 'async_trait>(
&'life0 self,
_session: &'life1 mut Session,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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