FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    FontFamilyKey

    struct · ferroui-base · v0.5.0

    struct FontFamilyKey
    

    Represents an identifier for a FontFamily.

    The source is a UriRef: an absolute URL (ferres://App/Assets#Inter without the name, fonts:Inter), or a reference relative to the base URI of the document that names the font (/Assets/Fonts).

    Two keys are equal when their sources and their base URIs are, compared as .NET's Uri compares them (decision O5 of docs/idiomatic-rust-signatures.md, the explicit key of the .NET rule): an absolute URL without its fragment, a relative reference by its whole text. The comparison reads the text of the URLs and allocates nothing, since font families compare their keys on the hot paths of text layout.

    View source

    Members

    new

    fn new(source: UriRef) -> Self
    

    Creates a key for a source.

    Source

    with_base_uri

    fn with_base_uri(source: UriRef, base_uri: Option<Url>) -> Self
    

    Creates a key for a source that is resolved against a base URI.

    Source

    source

    fn source(self: &Self) -> &UriRef
    

    Gets the source of the font family.

    Source

    base_uri

    fn base_uri(self: &Self) -> Option<&Url>
    

    Gets the base URI of the font family.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ResourceKeyObject
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ToString
    • ErasedDestructor
    • IntoEither
    • Clone
    • Debug
    • PartialEq
    • Eq
    • Hash
    • Display

    Availability

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