pub struct URIString { /* private fields */ }Implementations§
Source§impl URIString
impl URIString
pub fn parse(uri: impl AsRef<str>) -> Result<Self, ParseRIError>
Sourcepub fn parse_file_path(path: impl AsRef<Path>) -> Result<Self, ParseRIError>
pub fn parse_file_path(path: impl AsRef<Path>) -> Result<Self, ParseRIError>
§Note
In the current implementation, paths that cannot be converted to UTF-8 strings
cannot be handled.
I don’t think there will be any problems in most environments, but there may be
some paths that cannot be handled.
pub fn into_boxed_uri_str(self) -> Box<URIStr>
Methods from Deref<Target = URIStr>§
Sourcepub fn resolve(&self, reference: &Self) -> URIString
pub fn resolve(&self, reference: &Self) -> URIString
Resolve the relative reference reference using self as the base URI.
self must be convertible to an absolute URI
through fragment removal
and normalization.
§Reference
Sourcepub fn as_escaped_str(&self) -> &str
pub fn as_escaped_str(&self) -> &str
Return the escaped URI string.
Sourcepub fn as_unescaped_str(&self) -> Option<Cow<'_, str>>
pub fn as_unescaped_str(&self) -> Option<Cow<'_, str>>
Return the unescaped URI string.
If unescaping fails, return None.
Sourcepub fn is_absolute(&self) -> bool
pub fn is_absolute(&self) -> bool
§Reference
Sourcepub fn is_relative(&self) -> bool
pub fn is_relative(&self) -> bool
§Reference
§Reference
Sourcepub fn components(&self) -> Components<'_> ⓘ
pub fn components(&self) -> Components<'_> ⓘ
Return an iterator that scans the URI components.
Trait Implementations§
impl Eq for URIString
impl StructuralPartialEq for URIString
Auto Trait Implementations§
impl Freeze for URIString
impl RefUnwindSafe for URIString
impl Send for URIString
impl Sync for URIString
impl Unpin for URIString
impl UnwindSafe for URIString
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