Struct http_types::content::ContentLocation
source · pub struct ContentLocation { /* private fields */ }
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);
content_location.apply(&mut res);
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§
source§impl ContentLocation
impl ContentLocation
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ContentLocation
impl Send for ContentLocation
impl Sync for ContentLocation
impl Unpin for ContentLocation
impl UnwindSafe for ContentLocation
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more