[−][src]Struct pathetic::Uri
The relative URI container
Methods
impl Uri
[src]
pub fn new(input: &str) -> Result<Self, ParseError>
[src]
Create a new Uri
, from a path-query-fragment str
.
pub fn join(&self, input: &str) -> Result<Self, ParseError>
[src]
Parse a string as an URL, with this URL as the base URL.
pub fn as_str(&self) -> &str
[src]
Return the serialization of this URL.
pub fn path(&self) -> &str
[src]
Return the path for this URL, as a percent-encoded ASCII string.
pub fn query(&self) -> Option<&str>
[src]
Return this URL's query string, if any, as a percent-encoded ASCII string.
pub fn fragment(&self) -> Option<&str>
[src]
Return this URL's fragment identifier, if any.
pub fn path_segments(&self) -> Split<char>
[src]
Return an iterator of '/' slash-separated path segments, each as a percent-encoded ASCII string.
pub fn path_segments_mut(&mut self) -> PathSegmentsMut
[src]
Return an object with methods to manipulate this URL's path segments.
pub fn query_pairs(&self) -> Parse
[src]
Parse the URL's query string, if any, as application/x-www-form-urlencoded and return an iterator of (key, value) pairs.
pub fn query_pairs_mut(&mut self) -> Serializer<UrlQuery>
[src]
Manipulate this URL's query string, viewed as a sequence of name/value pairs in application/x-www-form-urlencoded syntax.
pub fn set_path(&mut self, path: &str)
[src]
Change this URL's path.
pub fn set_query(&mut self, query: Option<&str>)
[src]
Change this URL's query string.
pub fn set_fragment(&mut self, fragment: Option<&str>)
[src]
Change this URL's fragment identifier.
pub fn with_path(self, path: &str) -> Self
[src]
Modify the path inline.
pub fn with_query(self, query: Option<&str>) -> Self
[src]
Modify the fragment inline.
pub fn with_fragment(self, fragment: Option<&str>) -> Self
[src]
Modify the fragment inline.
pub fn with_path_segments_mut<F>(self, cls: F) -> Self where
F: for<'a, 'b> Fn(&'b mut PathSegmentsMut<'a>) -> &'b mut PathSegmentsMut<'a>,
[src]
F: for<'a, 'b> Fn(&'b mut PathSegmentsMut<'a>) -> &'b mut PathSegmentsMut<'a>,
Modify the path segments inline.
pub fn with_query_pairs_mut<F>(self, cls: F) -> Self where
F: for<'a, 'b> Fn(&'b mut Serializer<'a, UrlQuery<'a>>) -> &'b mut Serializer<'a, UrlQuery<'a>>,
[src]
F: for<'a, 'b> Fn(&'b mut Serializer<'a, UrlQuery<'a>>) -> &'b mut Serializer<'a, UrlQuery<'a>>,
Modify the query pairs inline.
Trait Implementations
impl AsRef<str> for Uri
[src]
impl Clone for Uri
[src]
impl Debug for Uri
[src]
impl Default for Uri
[src]
impl Display for Uri
[src]
impl Eq for Uri
[src]
impl Ord for Uri
[src]
fn cmp(&self, other: &Uri) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Uri> for Uri
[src]
impl PartialOrd<Uri> for Uri
[src]
fn partial_cmp(&self, other: &Uri) -> Option<Ordering>
[src]
fn lt(&self, other: &Uri) -> bool
[src]
fn le(&self, other: &Uri) -> bool
[src]
fn gt(&self, other: &Uri) -> bool
[src]
fn ge(&self, other: &Uri) -> bool
[src]
impl StructuralEq for Uri
[src]
impl StructuralPartialEq for Uri
[src]
impl<'_> TryFrom<&'_ str> for Uri
[src]
Auto Trait Implementations
impl RefUnwindSafe for Uri
impl Send for Uri
impl Sync for Uri
impl Unpin for Uri
impl UnwindSafe for Uri
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,