Struct cosmic_text::SwashCache
source · pub struct SwashCache<'a> {
pub image_cache: Map<CacheKey, Option<SwashImage>>,
/* private fields */
}
Expand description
Cache for rasterizing with the swash scaler
Fields
image_cache: Map<CacheKey, Option<SwashImage>>
Implementations
sourceimpl<'a> SwashCache<'a>
impl<'a> SwashCache<'a>
sourcepub fn new(font_system: &'a FontSystem) -> Self
pub fn new(font_system: &'a FontSystem) -> Self
Create a new swash cache
sourcepub fn get_image_uncached(&mut self, cache_key: CacheKey) -> Option<SwashImage>
pub fn get_image_uncached(&mut self, cache_key: CacheKey) -> Option<SwashImage>
Create a swash Image from a cache key, without caching results
sourcepub fn get_image(&mut self, cache_key: CacheKey) -> &Option<SwashImage>
pub fn get_image(&mut self, cache_key: CacheKey) -> &Option<SwashImage>
Create a swash Image from a cache key, caching results
Auto Trait Implementations
impl<'a> !RefUnwindSafe for SwashCache<'a>
impl<'a> Send for SwashCache<'a>
impl<'a> Sync for SwashCache<'a>
impl<'a> Unpin for SwashCache<'a>
impl<'a> !UnwindSafe for SwashCache<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more