Struct trillium_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); res.insert_header(&allow, &allow); let allow = Allow::from_headers(res)?.unwrap(); assert!(allow.contains(Method::Put)); assert!(allow.contains(Method::Post));
Implementations
Create a new instance from headers.
An iterator visiting all server entries.
Trait Implementations
Access the header’s name.
Access the header’s value.
Auto Trait Implementations
impl RefUnwindSafe for Allowimpl UnwindSafe for Allow