[][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 Clone for Allow[src]

impl PartialEq<Allow> for Allow[src]

impl Debug for Allow[src]

impl FromIterator<Method> for Allow[src]

impl Header for Allow[src]

Auto Trait Implementations

impl Send for Allow

impl Unpin for Allow

impl Sync for Allow

impl RefUnwindSafe for Allow

impl UnwindSafe for Allow

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