Enum solana_jsonrpc_http_server::CorsHeader [−][src]
pub enum CorsHeader<T = AccessControlAllowOrigin> { NotRequired, Invalid, Ok(T), }
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.
Methods
impl<T> CorsHeader<T>
[src]
impl<T> CorsHeader<T>
pub fn map<F, O>(self, f: F) -> CorsHeader<O> where
F: FnOnce(T) -> O,
[src]
pub fn map<F, O>(self, f: F) -> CorsHeader<O> where
F: FnOnce(T) -> O,
Maps Ok
variant of CorsHeader
.
Trait Implementations
impl<T> Into<Option<T>> for CorsHeader<T>
[src]
impl<T> Into<Option<T>> for CorsHeader<T>
impl<T> Clone for CorsHeader<T> where
T: Clone,
[src]
impl<T> Clone for CorsHeader<T> where
T: Clone,
fn clone(&self) -> CorsHeader<T>
[src]
fn clone(&self) -> CorsHeader<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<T> Debug for CorsHeader<T> where
T: Debug,
[src]
impl<T> Debug for CorsHeader<T> where
T: Debug,
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl<T> Eq for CorsHeader<T> where
T: Eq,
[src]
impl<T> Eq for CorsHeader<T> where
T: Eq,
impl<T> PartialEq<CorsHeader<T>> for CorsHeader<T> where
T: PartialEq<T>,
[src]
impl<T> PartialEq<CorsHeader<T>> for CorsHeader<T> where
T: PartialEq<T>,
fn eq(&self, other: &CorsHeader<T>) -> bool
[src]
fn eq(&self, other: &CorsHeader<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &CorsHeader<T>) -> bool
[src]
fn ne(&self, other: &CorsHeader<T>) -> bool
This method tests for !=
.
Auto Trait Implementations
impl<T> Send for CorsHeader<T> where
T: Send,
impl<T> Send for CorsHeader<T> where
T: Send,
impl<T> Sync for CorsHeader<T> where
T: Sync,
impl<T> Sync for CorsHeader<T> where
T: Sync,