pub struct ShapeCacheStats {
pub shapes: u64,
pub line_breaks: u64,
pub hits: u64,
pub evictions: u64,
}Expand description
Types named in TextContext’s own public signatures —
register_fonts() -> Result<Vec<RegisteredFamily>, FontError> and
shape_cache_stats() -> ShapeCacheStats. Without these an app could
call the methods but never name what they return.
Instrumentation counters for the shape cache — the observable hook the
shape-cache tests assert against, and a perf signal otherwise.
Plain scalar data (no parley/vello/wgpu leak), safe to expose from
crate::TextContext::shape_cache_stats.
Fields§
§shapes: u64Full shaping passes performed (a cache miss — parley build).
line_breaks: u64Line-break-only relayouts on an already-shaped cached entry (a width change with the shaping reused).
hits: u64Full reuses: the shaped layout was already broken at the requested width, so neither shaping nor line-breaking ran.
evictions: u64LRU evictions performed under capacity pressure.
Trait Implementations§
Source§impl Clone for ShapeCacheStats
impl Clone for ShapeCacheStats
Source§fn clone(&self) -> ShapeCacheStats
fn clone(&self) -> ShapeCacheStats
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ShapeCacheStats
Source§impl Debug for ShapeCacheStats
impl Debug for ShapeCacheStats
Source§impl Default for ShapeCacheStats
impl Default for ShapeCacheStats
Source§fn default() -> ShapeCacheStats
fn default() -> ShapeCacheStats
impl Eq for ShapeCacheStats
Source§impl PartialEq for ShapeCacheStats
impl PartialEq for ShapeCacheStats
impl StructuralPartialEq for ShapeCacheStats
Auto Trait Implementations§
impl Freeze for ShapeCacheStats
impl RefUnwindSafe for ShapeCacheStats
impl Send for ShapeCacheStats
impl Sync for ShapeCacheStats
impl Unpin for ShapeCacheStats
impl UnsafeUnpin for ShapeCacheStats
impl UnwindSafe for ShapeCacheStats
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
impl<T> Brush for T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
key and return true if they are equal.