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.
Members
new
fn new(source: UriRef) -> Self
Creates a key for a 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
fn source(self: &Self) -> &UriRef
Gets the source of the font family.
base_uri
fn base_uri(self: &Self) -> Option<&Url>
Gets the base URI of the font family.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeResourceKeyObjectPropertyValueAnyValueClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedToStringErasedDestructorIntoEitherCloneDebugPartialEqEqHashDisplay
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.