pub type GlyphKeyCache = ResourceClassCache<GlyphKey, GlyphCacheEntry, GlyphKeyCacheInfo>;

Aliased Type§

struct GlyphKeyCache {
    resources: HashMap<GlyphKey, GlyphCacheEntry, BuildHasherDefault<FxHasher>>,
    pub user_data: GlyphKeyCacheInfo,
}

Fields§

§resources: HashMap<GlyphKey, GlyphCacheEntry, BuildHasherDefault<FxHasher>>§user_data: GlyphKeyCacheInfo

Implementations§

source§

impl ResourceClassCache<GlyphKey, GlyphCacheEntry, GlyphKeyCacheInfo>

source

pub fn eviction_notice(&self) -> &EvictionNotice

source

fn clear_glyphs(&mut self)

source

pub fn add_glyph(&mut self, key: GlyphKey, value: GlyphCacheEntry)

source

fn clear_evicted(&mut self, texture_cache: &TextureCache)

source§

impl<K, V, U> ResourceClassCache<K, V, U>where K: Clone + Hash + Eq + Debug, U: Default,

source

pub fn new() -> Self

source

pub fn get(&self, key: &K) -> &V

source

pub fn try_get(&self, key: &K) -> Option<&V>

source

pub fn insert(&mut self, key: K, value: V)

source

pub fn remove(&mut self, key: &K) -> Option<V>

source

pub fn get_mut(&mut self, key: &K) -> &mut V

source

pub fn try_get_mut(&mut self, key: &K) -> Option<&mut V>

source

pub fn entry(&mut self, key: K) -> Entry<'_, K, V>

source

pub fn iter(&self) -> Iter<'_, K, V>

source

pub fn iter_mut(&mut self) -> IterMut<'_, K, V>

source

pub fn is_empty(&mut self) -> bool

source

pub fn clear(&mut self)

source

pub fn retain<F>(&mut self, f: F)where F: FnMut(&K, &mut V) -> bool,

Trait Implementations§

source§

impl<K, V, U> Serialize for ResourceClassCache<K, V, U>where K: Serialize + Hash + Eq, V: Serialize, U: Serialize + Default,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more