pub struct SharedFontInstanceMap { /* private fields */ }
Expand description
A map of font instance data accessed concurrently from multiple threads.
Implementations§
Sourcepub fn lock(&mut self) -> Option<RwLockReadGuard<'_, FontInstanceMap>>
pub fn lock(&mut self) -> Option<RwLockReadGuard<'_, FontInstanceMap>>
Acquires a write 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 set(&mut self, map: FontInstanceMap)
pub fn set(&mut self, map: FontInstanceMap)
Replace the shared map with the provided map.
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_key: FontInstanceKey,
font_key: FontKey,
size: f32,
options: Option<FontInstanceOptions>,
platform_options: Option<FontInstancePlatformOptions>,
variations: Vec<FontVariation>,
)
pub fn add_font_instance( &mut self, instance_key: FontInstanceKey, font_key: FontKey, size: f32, options: Option<FontInstanceOptions>, platform_options: Option<FontInstancePlatformOptions>, variations: Vec<FontVariation>, )
Sourcepub fn delete_font_instance(&mut self, instance_key: FontInstanceKey)
pub fn delete_font_instance(&mut self, instance_key: FontInstanceKey)
Sourcepub fn clear_namespace(&mut self, namespace: IdNamespace)
pub fn clear_namespace(&mut self, namespace: IdNamespace)
Sourcepub fn clone_map(&self) -> FontInstanceMap
pub fn clone_map(&self) -> FontInstanceMap
Trait Implementations§
Source§fn clone(&self) -> SharedFontInstanceMap
fn clone(&self) -> SharedFontInstanceMap
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§
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