Struct http_types::server::Allow [−][src]
pub struct Allow { /* fields omitted */ }
Expand description
List the set of methods supported by a resource.
Specifications
Examples
use http_types::{Method, Response}; use http_types::server::Allow; let mut allow = Allow::new(); allow.insert(Method::Put); allow.insert(Method::Post); let mut res = Response::new(200); allow.apply(&mut res); let allow = Allow::from_headers(res)?.unwrap(); assert!(allow.contains(Method::Put)); assert!(allow.contains(Method::Post));
Implementations
Create a new instance from headers.
Get the HeaderName
.
Get the HeaderValue
.
An iterator visiting all server entries.
Trait Implementations
type Iter = IntoIter<HeaderValue>
type Iter = IntoIter<HeaderValue>
Returned iterator over header values which this type may correspond to.
Converts this object to an iterator of resolved HeaderValues
.