pub struct GlyphCache { /* private fields */ }Expand description
LRU-style glyph cache with configurable capacity
Implementations§
Source§impl GlyphCache
impl GlyphCache
Sourcepub fn get(&self, key: &GlyphCacheKey) -> Option<GlyphBitmap>
pub fn get(&self, key: &GlyphCacheKey) -> Option<GlyphBitmap>
Get a cached glyph bitmap if available
Sourcepub fn insert(&self, key: GlyphCacheKey, bitmap: GlyphBitmap)
pub fn insert(&self, key: GlyphCacheKey, bitmap: GlyphBitmap)
Insert a glyph bitmap into the cache
Sourcepub fn stats(&self) -> GlyphCacheStats
pub fn stats(&self) -> GlyphCacheStats
Get cache statistics
Auto Trait Implementations§
impl !Freeze for GlyphCache
impl RefUnwindSafe for GlyphCache
impl Send for GlyphCache
impl Sync for GlyphCache
impl Unpin for GlyphCache
impl UnsafeUnpin for GlyphCache
impl UnwindSafe for GlyphCache
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