pub struct ShapeCacheStats {
pub shapes: u64,
pub line_breaks: u64,
pub hits: u64,
pub evictions: u64,
}Expand description
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
impl Copy for ShapeCacheStats
Source§impl Debug for ShapeCacheStats
impl Debug for ShapeCacheStats
Source§impl Default for ShapeCacheStats
impl Default for 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
Mutably borrows from an owned value. Read more