Enum actix_web::middleware::cors::AllOrSome [−][src]
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
All
Everything 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) -> bool
Returns whether this is an All
variant
pub fn is_some(&self) -> bool
[src]
[−]
pub fn is_some(&self) -> bool
Returns 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>
impl<T: Debug> Debug for AllOrSome<T>
[src]
[+]
impl<T: Debug> Debug for AllOrSome<T>
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>
impl<T> Default for AllOrSome<T>
[src]
[+]
impl<T> Default for AllOrSome<T>