pub struct FontCatalogCache {
pub revision: u64,
/* private fields */
}Expand description
Cached font family name list for efficient UI rendering.
This is intended to be stored as a global and refreshed by runners when the renderer’s font backend changes (e.g. dynamic font injection on web or user-installed fonts on desktop).
Fields§
§revision: u64Implementations§
Source§impl FontCatalogCache
impl FontCatalogCache
pub fn families(&self) -> &[Arc<str>]
pub fn families_arc(&self) -> Arc<[Arc<str>]>
pub fn from_catalog(catalog: &FontCatalog) -> Self
pub fn from_families(revision: u64, families: &[String]) -> Self
Trait Implementations§
Source§impl Clone for FontCatalogCache
impl Clone for FontCatalogCache
Source§fn clone(&self) -> FontCatalogCache
fn clone(&self) -> FontCatalogCache
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FontCatalogCache
impl Debug for FontCatalogCache
Source§impl Default for FontCatalogCache
impl Default for FontCatalogCache
Source§impl PartialEq for FontCatalogCache
impl PartialEq for FontCatalogCache
impl Eq for FontCatalogCache
impl StructuralPartialEq for FontCatalogCache
Auto Trait Implementations§
impl Freeze for FontCatalogCache
impl RefUnwindSafe for FontCatalogCache
impl Send for FontCatalogCache
impl Sync for FontCatalogCache
impl Unpin for FontCatalogCache
impl UnsafeUnpin for FontCatalogCache
impl UnwindSafe for FontCatalogCache
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
Mutably borrows from an owned value. Read more