pub struct SharedFontResources {
pub templates: FontTemplateMap,
pub instances: FontInstanceMap,
pub font_keys: FontKeyMap,
pub instance_keys: FontInstanceKeyMap,
}Expand description
Shared font resources that may need to be passed between multiple threads such as font templates and font instances. They are individually protected by locks to ensure safety.
Fields§
§templates: FontTemplateMap§instances: FontInstanceMap§font_keys: FontKeyMap§instance_keys: FontInstanceKeyMapImplementations§
pub fn new(namespace: IdNamespace) -> Self
Trait Implementations§
Source§fn get_font_data(&self, key: FontKey) -> Option<FontTemplate>
fn get_font_data(&self, key: FontKey) -> Option<FontTemplate>
Returns the
FontTemplate for the given key.Source§fn get_font_instance_data(
&self,
key: FontInstanceKey,
) -> Option<FontInstanceData>
fn get_font_instance_data( &self, key: FontInstanceKey, ) -> Option<FontInstanceData>
Returns the
FontInstanceData for the given key, if found.Source§fn clone(&self) -> SharedFontResources
fn clone(&self) -> SharedFontResources
Returns a duplicate 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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