# 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

`All`

Everything is allowed. Usually equivalent to the "*" value.

`Some(T)`

Only some of `T` is allowed

## Methods

###

`impl<T> AllOrSome<T>`

[src]

####

`pub fn is_all(&self) -> bool`

[src]

Returns whether this is an `All` variant

####

`pub fn is_some(&self) -> bool`

[src]

Returns whether this is a `Some` variant

####

`pub fn as_ref(&self) -> Option<&T>`

[src]

Returns &T

## Trait Implementations

###

`impl<T: Clone> Clone for AllOrSome<T>`

[src]

####

`fn clone(&self) -> AllOrSome<T>`

[src]

Returns a copy of the value. Read more

####

`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]

####

`fn fmt(&self, f: &mut Formatter) -> Result`

[src]

Formats the value using the given formatter. Read more

###

`impl<T: Eq> Eq for AllOrSome<T>`

[src]

###

`impl<T: PartialEq> PartialEq for AllOrSome<T>`

[src]

####

`fn eq(&self, other: &AllOrSome<T>) -> bool`

[src]

This method tests for `self` and `other` values to be equal, and is used by `==`. Read more

####

`fn ne(&self, other: &AllOrSome<T>) -> bool`

[src]

This method tests for `!=`.

###

`impl<T> Default for AllOrSome<T>`

[src]

####

`fn default() -> Self`

[src]

Returns the "default value" for a type. Read more

## Auto Trait Implementations

###

`impl<T> Send for AllOrSome<T> where T: Send,`

###

`impl<T> Sync for AllOrSome<T> where T: Sync,`

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g. `str,u8` or `String,struct:Vec,test`)