pub struct GlyphCacheKey {
pub renderer: String,
pub font_id: u64,
pub shaped_hash: u64,
pub render_hash: u64,
}Expand description
Stable key for render output caching
Fields§
§renderer: StringRenderer/backend identity
font_id: u64Font identity hash
shaped_hash: u64Hash of shaped glyph sequence (positions + ids + direction)
render_hash: u64Hash of render parameters (colors, AA, palette, variations, glyph sources)
Implementations§
Source§impl GlyphCacheKey
impl GlyphCacheKey
Sourcepub fn new(
renderer: impl Into<String>,
font_data: &[u8],
shaped: &ShapingResult,
render_params: &RenderParams,
) -> Self
pub fn new( renderer: impl Into<String>, font_data: &[u8], shaped: &ShapingResult, render_params: &RenderParams, ) -> Self
Build a key from runtime inputs
Trait Implementations§
Source§impl Clone for GlyphCacheKey
impl Clone for GlyphCacheKey
Source§fn clone(&self) -> GlyphCacheKey
fn clone(&self) -> GlyphCacheKey
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 GlyphCacheKey
impl Debug for GlyphCacheKey
Source§impl Hash for GlyphCacheKey
impl Hash for GlyphCacheKey
Source§impl PartialEq for GlyphCacheKey
impl PartialEq for GlyphCacheKey
impl Eq for GlyphCacheKey
impl StructuralPartialEq for GlyphCacheKey
Auto Trait Implementations§
impl Freeze for GlyphCacheKey
impl RefUnwindSafe for GlyphCacheKey
impl Send for GlyphCacheKey
impl Sync for GlyphCacheKey
impl Unpin for GlyphCacheKey
impl UnsafeUnpin for GlyphCacheKey
impl UnwindSafe for GlyphCacheKey
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.