[][src]Struct kayrx::http::header::Allow

pub struct Allow(pub Vec<Method>);

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

use kayrx::http::Response;
use kayrx::http::header::Allow;
use http::Method;

let mut builder = Response::Ok();
builder.set(
    Allow(vec![Method::GET])
);
use kayrx::http::Response;
use kayrx::http::header::Allow;
use http::Method;

let mut builder = Response::Ok();
builder.set(
    Allow(vec![
        Method::GET,
        Method::POST,
        Method::PATCH,
    ])
);

Trait Implementations

impl Clone for Allow[src]

impl Debug for Allow[src]

impl Deref for Allow[src]

type Target = Vec<Method>

The resulting type after dereferencing.

impl DerefMut for Allow[src]

impl Display for Allow[src]

impl Header for Allow[src]

impl IntoHeaderValue for Allow[src]

type Error = InvalidHeaderValue

The type returned in the event of a conversion error.

impl PartialEq<Allow> for Allow[src]

impl StructuralPartialEq for Allow[src]

Auto Trait Implementations

impl RefUnwindSafe for Allow

impl Send for Allow

impl Sync for Allow

impl Unpin for Allow

impl UnwindSafe for Allow

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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<V, T> VZip<V> for T where
    V: MultiLane<T>,