pub struct UriExtensions;Expand description
Helpers for the URIs that identify assets.
Implementations§
Source§impl UriExtensions
impl UriExtensions
Sourcepub fn is_absolute_resm(uri: &Uri) -> bool
pub fn is_absolute_resm(uri: &Uri) -> bool
Whether the URI is an absolute embedded-resource URI.
Sourcepub fn is_resm(uri: &Uri) -> bool
pub fn is_resm(uri: &Uri) -> bool
Whether the URI has the embedded-resource scheme. Panics for a relative URI.
Sourcepub fn is_asset(uri: &Uri) -> bool
pub fn is_asset(uri: &Uri) -> bool
Whether the URI has the asset scheme (ASSET_SCHEME). Panics for a
relative URI.
Sourcepub fn is_font_collection(uri: &Uri) -> bool
pub fn is_font_collection(uri: &Uri) -> bool
Whether the URI names a font collection (fonts: scheme). Panics for
a relative URI.
Sourcepub fn ensure_absolute(
uri: &Uri,
base_uri: Option<&Uri>,
) -> Result<Uri, FormatError>
pub fn ensure_absolute( uri: &Uri, base_uri: Option<&Uri>, ) -> Result<Uri, FormatError>
Makes a relative URI absolute using base_uri; absolute URIs are
returned unchanged. Fails when the URI is relative and base_uri is
missing or relative.
The authority (host) of an absolute URI, or an empty string when it has none. Panics for a relative URI.
Sourcepub fn get_unescape_absolute_path(uri: &Uri) -> String
pub fn get_unescape_absolute_path(uri: &Uri) -> String
The unescaped path of an absolute URI.
Sourcepub fn get_unescape_absolute_uri(uri: &Uri) -> String
pub fn get_unescape_absolute_uri(uri: &Uri) -> String
The unescaped text of an absolute URI.
Sourcepub fn get_assembly_name_from_query(uri: &Uri) -> String
pub fn get_assembly_name_from_query(uri: &Uri) -> String
The value of the assembly parameter of the query of an absolute
URI, or an empty string.
Sourcepub fn unescape_data_string(s: &str) -> String
pub fn unescape_data_string(s: &str) -> String
Converts the percent-encoded sequences of a string to the characters they represent. Sequences that do not form valid UTF-8 are left as they are.
Auto Trait Implementations§
impl Freeze for UriExtensions
impl RefUnwindSafe for UriExtensions
impl Send for UriExtensions
impl Sync for UriExtensions
impl Unpin for UriExtensions
impl UnsafeUnpin for UriExtensions
impl UnwindSafe for UriExtensions
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more