[−][src]Struct headers::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]
&'a self
) -> impl Iterator<Item = Method> + 'a
Returns an iterator over Method
s contained within.
Trait Implementations
impl Clone for Allow
[src]
fn clone(&self) -> Allow
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<Allow> for Allow
[src]
impl FromIterator<Method> for Allow
[src]
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = Method>,
[src]
I: IntoIterator<Item = Method>,
impl Debug for Allow
[src]
impl Header for Allow
[src]
fn name() -> &'static HeaderName
[src]
fn decode<'i, I>(values: &mut I) -> Result<Self, Error> where
I: Iterator<Item = &'i HeaderValue>,
[src]
I: Iterator<Item = &'i HeaderValue>,
fn encode<E: Extend<HeaderValue>>(&self, values: &mut E)
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Same for T
type Output = T
Should always be Self