pub struct CorsConfig { /* private fields */ }Implementations§
Source§impl CorsConfig
impl CorsConfig
pub fn permissive() -> Self
pub fn restricted<I, S>(allowed_origins: I) -> Self
pub fn with_allowed_methods<I, S>(self, allowed_methods: I) -> Self
pub fn with_max_age(self, max_age: usize) -> Self
pub fn is_permissive(&self) -> bool
pub fn allowed_origins(&self) -> &[String]
pub fn allowed_methods(&self) -> &[String]
pub fn max_age(&self) -> Option<usize>
Trait Implementations§
Source§impl Clone for CorsConfig
impl Clone for CorsConfig
Source§fn clone(&self) -> CorsConfig
fn clone(&self) -> CorsConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CorsConfig
impl Debug for CorsConfig
Source§impl Default for CorsConfig
impl Default for CorsConfig
Source§impl PartialEq for CorsConfig
impl PartialEq for CorsConfig
Source§fn eq(&self, other: &CorsConfig) -> bool
fn eq(&self, other: &CorsConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for CorsConfig
impl StructuralPartialEq for CorsConfig
Auto Trait Implementations§
impl Freeze for CorsConfig
impl RefUnwindSafe for CorsConfig
impl Send for CorsConfig
impl Sync for CorsConfig
impl Unpin for CorsConfig
impl UnsafeUnpin for CorsConfig
impl UnwindSafe for CorsConfig
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.