Struct webrender::resource_cache::ResourceClassCache
source · pub struct ResourceClassCache<K: Hash + Eq, V, U: Default> {
resources: FastHashMap<K, V>,
pub user_data: U,
}
Fields§
§resources: FastHashMap<K, V>
§user_data: U
Implementations§
source§impl ResourceClassCache<GlyphKey, GlyphCacheEntry, GlyphKeyCacheInfo>
impl ResourceClassCache<GlyphKey, GlyphCacheEntry, GlyphKeyCacheInfo>
pub fn eviction_notice(&self) -> &EvictionNotice
fn clear_glyphs(&mut self)
pub fn add_glyph(&mut self, key: GlyphKey, value: GlyphCacheEntry)
fn clear_evicted(&mut self, texture_cache: &TextureCache)
source§impl<K, V, U> ResourceClassCache<K, V, U>
impl<K, V, U> ResourceClassCache<K, V, U>
pub fn new() -> Self
pub fn get(&self, key: &K) -> &V
pub fn try_get(&self, key: &K) -> Option<&V>
pub fn insert(&mut self, key: K, value: V)
pub fn remove(&mut self, key: &K) -> Option<V>
pub fn get_mut(&mut self, key: &K) -> &mut V
pub fn try_get_mut(&mut self, key: &K) -> Option<&mut V>
pub fn entry(&mut self, key: K) -> Entry<'_, K, V>
pub fn iter(&self) -> Iter<'_, K, V>
pub fn iter_mut(&mut self) -> IterMut<'_, K, V>
pub fn is_empty(&mut self) -> bool
pub fn clear(&mut self)
pub fn retain<F>(&mut self, f: F)
Trait Implementations§
Auto Trait Implementations§
impl<K, V, U> Freeze for ResourceClassCache<K, V, U>where
U: Freeze,
impl<K, V, U> RefUnwindSafe for ResourceClassCache<K, V, U>
impl<K, V, U> Send for ResourceClassCache<K, V, U>
impl<K, V, U> Sync for ResourceClassCache<K, V, U>
impl<K, V, U> Unpin for ResourceClassCache<K, V, U>
impl<K, V, U> UnwindSafe for ResourceClassCache<K, V, U>
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more