Struct http_types::security::TimingAllowOrigin [−][src]
pub struct TimingAllowOrigin { /* fields omitted */ }
Expand description
Specify origins that are allowed to see values via the Resource Timing API.
Examples
use http_types::{Response, Url}; use http_types::security::TimingAllowOrigin; let mut origins = TimingAllowOrigin::new(); origins.push(Url::parse("https://example.com")?); let mut res = Response::new(200); origins.apply(&mut res); let origins = TimingAllowOrigin::from_headers(res)?.unwrap(); let origin = origins.iter().next().unwrap(); assert_eq!(origin, &Url::parse("https://example.com")?);
Implementations
Create an instance of AllowOrigin
from a Headers
instance.
Implementation note
A header value of "null"
is treated the same as if no header was sent.
Insert a HeaderName
+ HeaderValue
pair into a Headers
instance.
Get the HeaderName
.
Get the HeaderValue
.
Set the wildcard directive.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
.
Auto Trait Implementations
impl RefUnwindSafe for TimingAllowOrigin
impl Send for TimingAllowOrigin
impl Sync for TimingAllowOrigin
impl Unpin for TimingAllowOrigin
impl UnwindSafe for TimingAllowOrigin
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self