FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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).

    View source

    Members

    is_absolute_resm

    fn is_absolute_resm(uri: &UriRef) -> bool
    

    Whether the reference is an absolute embedded-resource URL.

    Source

    is_resm

    fn is_resm(uri: &url::Url) -> bool
    

    Whether the URL has the embedded-resource scheme.

    Source

    is_asset

    fn is_asset(uri: &url::Url) -> bool
    

    Whether the URL has the asset scheme (ASSET_SCHEME).

    Source

    is_font_collection

    fn is_font_collection(uri: &url::Url) -> bool
    

    Whether the URL names a font collection (fonts: scheme).

    Source

    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.

    Source

    authority

    fn authority(uri: &url::Url) -> &str
    

    The authority (host) of a URL, or an empty string when it has none.

    Source

    get_unescape_absolute_path

    fn get_unescape_absolute_path(uri: &url::Url) -> String
    

    The unescaped path of a URL.

    Source

    get_unescape_absolute_uri

    fn get_unescape_absolute_uri(uri: &url::Url) -> String
    

    The unescaped text of a URL.

    Source

    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.

    Source

    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.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ErasedDestructor
    • IntoEither

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.