[][src]Struct headers::Allow

pub struct Allow(_);

Allow header, defined in RFC7231

The Allow header field lists the set of methods advertised as supported by the target resource. The purpose of this field is strictly to inform the recipient of valid request methods associated with the resource.

ABNF

Allow = #method

Example values

  • GET, HEAD, PUT
  • OPTIONS, GET, PUT, POST, DELETE, HEAD, TRACE, CONNECT, PATCH, fOObAr
  • ``

Examples

extern crate http;
use headers::Allow;
use http::Method;

let allow = vec![Method::GET, Method::POST]
    .into_iter()
    .collect::<Allow>();

Methods

impl Allow[src]

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

Returns an iterator over Methods contained within.

Trait Implementations

impl PartialEq<Allow> for Allow[src]

impl Clone for Allow[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Allow[src]

impl FromIterator<Method> for Allow[src]

impl Header for Allow[src]

Auto Trait Implementations

impl Send for Allow

impl Sync for Allow

Blanket Implementations

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

impl<T> From for T[src]

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Same for T

type Output = T

Should always be Self