pub struct RunCacheKey<'a> {
pub text: &'a str,
pub script: Script,
pub direction: RunDirection,
pub style_id: u64,
}Expand description
Deterministic, hashable cache key for shaped glyph output.
Two runs producing equal RunCacheKey values can share the same
shaped glyph buffer, enabling efficient caching of shaping results.
Fields§
§text: &'a strThe text content of the run.
script: ScriptThe resolved script.
direction: RunDirectionThe text direction.
style_id: u64Style discriminant (e.g., hash of font weight + style + size).
Trait Implementations§
Source§impl<'a> Clone for RunCacheKey<'a>
impl<'a> Clone for RunCacheKey<'a>
Source§fn clone(&self) -> RunCacheKey<'a>
fn clone(&self) -> RunCacheKey<'a>
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<'a> Debug for RunCacheKey<'a>
impl<'a> Debug for RunCacheKey<'a>
Source§impl Hash for RunCacheKey<'_>
impl Hash for RunCacheKey<'_>
Source§impl<'a> PartialEq for RunCacheKey<'a>
impl<'a> PartialEq for RunCacheKey<'a>
impl<'a> Eq for RunCacheKey<'a>
impl<'a> StructuralPartialEq for RunCacheKey<'a>
Auto Trait Implementations§
impl<'a> Freeze for RunCacheKey<'a>
impl<'a> RefUnwindSafe for RunCacheKey<'a>
impl<'a> Send for RunCacheKey<'a>
impl<'a> Sync for RunCacheKey<'a>
impl<'a> Unpin for RunCacheKey<'a>
impl<'a> UnsafeUnpin for RunCacheKey<'a>
impl<'a> UnwindSafe for RunCacheKey<'a>
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.