[][src]Struct headers::AccessControlAllowHeaders

pub struct AccessControlAllowHeaders(_);

Access-Control-Allow-Headers header, part of CORS

The Access-Control-Allow-Headers header indicates, as part of the response to a preflight request, which header field names can be used during the actual request.

ABNF

Access-Control-Allow-Headers: "Access-Control-Allow-Headers" ":" #field-name

Example values

  • accept-language, date

Examples

extern crate http;
use http::header::{CACHE_CONTROL, CONTENT_TYPE};
use headers::AccessControlAllowHeaders;

let allow_headers = vec![CACHE_CONTROL, CONTENT_TYPE]
    .into_iter()
    .collect::<AccessControlAllowHeaders>();

Methods

impl AccessControlAllowHeaders[src]

pub fn iter<'a>(&'a self) -> impl Iterator<Item = HeaderName> + 'a[src]

Returns an iterator over HeaderNames contained within.

Trait Implementations

impl Clone for AccessControlAllowHeaders[src]

impl PartialEq<AccessControlAllowHeaders> for AccessControlAllowHeaders[src]

impl Debug for AccessControlAllowHeaders[src]

impl FromIterator<HeaderName> for AccessControlAllowHeaders[src]

impl Header for AccessControlAllowHeaders[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self