Struct trillium_http_types::content::ContentLocation [−][src]
pub struct ContentLocation { /* fields omitted */ }Expand description
Indicates an alternate location for the returned data.
Specifications
Examples
use http_types::{Response, Url}; use http_types::content::ContentLocation; let content_location = ContentLocation::new(Url::parse("https://example.net/")?); let mut res = Response::new(200); res.insert_header(&content_location, &content_location); let url = Url::parse("https://example.net/")?; let content_location = ContentLocation::from_headers(url, res)?.unwrap(); assert_eq!(content_location.location(), &Url::parse("https://example.net/")?);
Implementations
Create a new instance from headers.
Trait Implementations
Access the header’s name.
Access the header’s value.
Auto Trait Implementations
impl RefUnwindSafe for ContentLocationimpl Send for ContentLocationimpl Sync for ContentLocationimpl Unpin for ContentLocationimpl UnwindSafe for ContentLocation