Enum actix_web::middleware::cors::AllOrSome [−][src]
pub enum AllOrSome<T> {
All,
Some(T),
}An enum signifying that some of type T is allowed, or All (everything is
allowed).
Default is implemented for this enum and is All.
Variants
AllEverything is allowed. Usually equivalent to the "*" value.
Some(T)Only some of T is allowed
Methods
impl<T> AllOrSome<T>[src]
impl<T> AllOrSome<T>pub fn is_all(&self) -> bool[src]
pub fn is_all(&self) -> boolReturns whether this is an All variant
pub fn is_some(&self) -> bool[src]
pub fn is_some(&self) -> boolReturns whether this is a Some variant
pub fn as_ref(&self) -> Option<&T>[src]
pub fn as_ref(&self) -> Option<&T>Returns &T
Trait Implementations
impl<T: Clone> Clone for AllOrSome<T>[src]
impl<T: Clone> Clone for AllOrSome<T>fn clone(&self) -> AllOrSome<T>[src]
fn clone(&self) -> AllOrSome<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> Debug for AllOrSome<T>[src]
impl<T: Debug> Debug for AllOrSome<T>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<T: Eq> Eq for AllOrSome<T>[src]
impl<T: Eq> Eq for AllOrSome<T>impl<T: PartialEq> PartialEq for AllOrSome<T>[src]
impl<T: PartialEq> PartialEq for AllOrSome<T>fn eq(&self, other: &AllOrSome<T>) -> bool[src]
fn eq(&self, other: &AllOrSome<T>) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &AllOrSome<T>) -> bool[src]
fn ne(&self, other: &AllOrSome<T>) -> boolThis method tests for !=.
impl<T> Default for AllOrSome<T>[src]
impl<T> Default for AllOrSome<T>