UriExtensions
struct · ferroui-base · v0.5.0
struct UriExtensions
Helpers for the URIs that identify assets: absolute ones are url::Url,
references that may be relative UriRef (C5 of #423).
Members
is_absolute_resmis_resmis_assetis_font_collectionensure_absoluteauthorityget_unescape_absolute_pathget_unescape_absolute_uriget_assembly_name_from_queryunescape_data_string
is_absolute_resm
fn is_absolute_resm(uri: &UriRef) -> bool
Whether the reference is an absolute embedded-resource URL.
is_resm
fn is_resm(uri: &url::Url) -> bool
Whether the URL has the embedded-resource scheme.
is_asset
fn is_asset(uri: &url::Url) -> bool
Whether the URL has the asset scheme (ASSET_SCHEME).
is_font_collection
fn is_font_collection(uri: &url::Url) -> bool
Whether the URL names a font collection (fonts: scheme).
ensure_absolute
fn ensure_absolute(uri: &UriRef, base_uri: Option<&url::Url>) -> Result<url::Url, FormatError>
Makes a relative reference absolute using base_uri, with
UriRef::resolve; an absolute reference is its URL. Fails when the
reference is relative and base_uri is missing, or when the reference
does not resolve to a URL.
authority
fn authority(uri: &url::Url) -> &str
The authority (host) of a URL, or an empty string when it has none.
get_unescape_absolute_path
fn get_unescape_absolute_path(uri: &url::Url) -> String
The unescaped path of a URL.
get_unescape_absolute_uri
fn get_unescape_absolute_uri(uri: &url::Url) -> String
The unescaped text of a URL.
get_assembly_name_from_query
fn get_assembly_name_from_query(uri: &url::Url) -> String
The value of the assembly parameter of the query of a URL, or an
empty string.
unescape_data_string
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEither
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.