pub struct Url { /* private fields */ }
Expand description
Contains a request url.
This is a wrapper around Uri
with the caveat that a scheme
and an authority is set, which makes it a Url.
Implementations§
Source§impl Url
impl Url
Sourcepub fn from_inner(inner: Uri) -> Option<Url>
pub fn from_inner(inner: Uri) -> Option<Url>
Creates a new Uri
from an http::Uri
Returns None if the http::Uri
does not contain a scheme or authority.
Sourcepub fn path_segments(&self) -> Split<'_, char>
pub fn path_segments(&self) -> Split<'_, char>
Returns the path as segments divided by a slash, first starting and ending slash removed.
Sourcepub fn parse_query_pairs(&self) -> Parse<'_> ⓘ
pub fn parse_query_pairs(&self) -> Parse<'_> ⓘ
Returns an iterator with the Item (Cow<'_, str>, Cow<'_, str>)
Key and values are percent decoded.
Trait Implementations§
impl Eq for Url
impl StructuralPartialEq for Url
Auto Trait Implementations§
impl !Freeze for Url
impl RefUnwindSafe for Url
impl Send for Url
impl Sync for Url
impl Unpin for Url
impl UnwindSafe for Url
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.