pub enum AllowOrigins {
Any,
List(HashSet<String>),
Echo,
}Expand description
Policy for allowed origins.
Variants§
Any
Allow any origin (*).
Cannot be used with allow_credentials = true.
List(HashSet<String>)
Allow only specific origins.
Echo
Echo the Origin header back (required when allow_credentials = true).
Trait Implementations§
Source§impl Clone for AllowOrigins
impl Clone for AllowOrigins
Source§fn clone(&self) -> AllowOrigins
fn clone(&self) -> AllowOrigins
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for AllowOrigins
impl RefUnwindSafe for AllowOrigins
impl Send for AllowOrigins
impl Sync for AllowOrigins
impl Unpin for AllowOrigins
impl UnwindSafe for AllowOrigins
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