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: FontInstanceKeyMap
Implementations§
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 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
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