pub enum CorsHeader<T = AccessControlAllowOrigin> {
NotRequired,
Invalid,
Ok(T),
}
Expand description
CORS Header Result.
Variants§
NotRequired
CORS header was not required. Origin is not present in the request.
Invalid
CORS header is not returned, Origin is not allowed to access the resource.
Ok(T)
CORS header to include in the response. Origin is allowed to access the resource.
Implementations§
Source§impl<T> CorsHeader<T>
impl<T> CorsHeader<T>
Sourcepub fn map<F, O>(self, f: F) -> CorsHeader<O>where
F: FnOnce(T) -> O,
pub fn map<F, O>(self, f: F) -> CorsHeader<O>where
F: FnOnce(T) -> O,
Maps Ok
variant of CorsHeader
.
Trait Implementations§
Source§impl<T> Clone for CorsHeader<T>where
T: Clone,
impl<T> Clone for CorsHeader<T>where
T: Clone,
Source§fn clone(&self) -> CorsHeader<T>
fn clone(&self) -> CorsHeader<T>
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<T> Debug for CorsHeader<T>where
T: Debug,
impl<T> Debug for CorsHeader<T>where
T: Debug,
Source§impl<T> Into<Option<T>> for CorsHeader<T>
impl<T> Into<Option<T>> for CorsHeader<T>
Source§impl<T> PartialEq for CorsHeader<T>where
T: PartialEq,
impl<T> PartialEq for CorsHeader<T>where
T: PartialEq,
impl<T> Eq for CorsHeader<T>where
T: Eq,
impl<T> StructuralPartialEq for CorsHeader<T>
Auto Trait Implementations§
impl<T> Freeze for CorsHeader<T>where
T: Freeze,
impl<T> RefUnwindSafe for CorsHeader<T>where
T: RefUnwindSafe,
impl<T> Send for CorsHeader<T>where
T: Send,
impl<T> Sync for CorsHeader<T>where
T: Sync,
impl<T> Unpin for CorsHeader<T>where
T: Unpin,
impl<T> UnwindSafe for CorsHeader<T>where
T: 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