Struct wr_glyph_rasterizer::rasterizer::FontInstanceMap
source · pub struct FontInstanceMap(Arc<RwLock<FastHashMap<FontInstanceKey, Arc<BaseFontInstance>>>>);
Expand description
A map of font instance data accessed concurrently from multiple threads.
Tuple Fields§
§0: Arc<RwLock<FastHashMap<FontInstanceKey, Arc<BaseFontInstance>>>>
Implementations§
source§impl FontInstanceMap
impl FontInstanceMap
sourcepub fn lock(
&self,
) -> RwLockReadGuard<'_, FastHashMap<FontInstanceKey, Arc<BaseFontInstance>>>
pub fn lock( &self, ) -> RwLockReadGuard<'_, FastHashMap<FontInstanceKey, Arc<BaseFontInstance>>>
Acquires a read lock on the shared map.
sourcefn lock_mut(
&mut self,
) -> RwLockWriteGuard<'_, FastHashMap<FontInstanceKey, Arc<BaseFontInstance>>>
fn lock_mut( &mut self, ) -> RwLockWriteGuard<'_, FastHashMap<FontInstanceKey, Arc<BaseFontInstance>>>
Acquires a read lock on the shared map.
sourcepub fn get_font_instance_data(
&self,
key: FontInstanceKey,
) -> Option<FontInstanceData>
pub fn get_font_instance_data( &self, key: FontInstanceKey, ) -> Option<FontInstanceData>
sourcepub fn get_font_instance(
&self,
instance_key: FontInstanceKey,
) -> Option<Arc<BaseFontInstance>>
pub fn get_font_instance( &self, instance_key: FontInstanceKey, ) -> Option<Arc<BaseFontInstance>>
sourcepub fn add_font_instance(&mut self, instance: Arc<BaseFontInstance>)
pub fn add_font_instance(&mut self, instance: Arc<BaseFontInstance>)
sourcepub fn delete_font_instance(&mut self, instance_key: FontInstanceKey)
pub fn delete_font_instance(&mut self, instance_key: FontInstanceKey)
sourcepub fn delete_font_instances(&mut self, keys: &[FontInstanceKey])
pub fn delete_font_instances(&mut self, keys: &[FontInstanceKey])
sourcepub fn clear_namespace(&mut self, namespace: IdNamespace)
pub fn clear_namespace(&mut self, namespace: IdNamespace)
Trait Implementations§
source§impl Clone for FontInstanceMap
impl Clone for FontInstanceMap
source§fn clone(&self) -> FontInstanceMap
fn clone(&self) -> FontInstanceMap
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for FontInstanceMap
impl RefUnwindSafe for FontInstanceMap
impl Send for FontInstanceMap
impl Sync for FontInstanceMap
impl Unpin for FontInstanceMap
impl UnwindSafe for FontInstanceMap
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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