pub struct FontTemplateRef(Arc<AtomicRefCell<FontTemplate>>);
Expand description
A reference to a FontTemplate
with shared ownership and mutability.
Tuple Fields§
§0: Arc<AtomicRefCell<FontTemplate>>
Implementations§
Source§impl FontTemplateRef
impl FontTemplateRef
pub fn new(template: FontTemplate) -> Self
Trait Implementations§
Source§impl Clone for FontTemplateRef
impl Clone for FontTemplateRef
Source§fn clone(&self) -> FontTemplateRef
fn clone(&self) -> FontTemplateRef
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 moreSource§impl Debug for FontTemplateRef
impl Debug for FontTemplateRef
Source§impl Deref for FontTemplateRef
impl Deref for FontTemplateRef
Source§type Target = Arc<AtomicRefCell<FontTemplate>>
type Target = Arc<AtomicRefCell<FontTemplate>>
The resulting type after dereferencing.
Source§impl FontTemplateRefMethods for FontTemplateRef
impl FontTemplateRefMethods for FontTemplateRef
Source§fn descriptor(&self) -> FontTemplateDescriptor
fn descriptor(&self) -> FontTemplateDescriptor
Get the descriptor.
Source§fn identifier(&self) -> FontIdentifier
fn identifier(&self) -> FontIdentifier
Get the
FontIdentifier
for this template.Source§fn matches_font_descriptor(&self, descriptor_to_match: &FontDescriptor) -> bool
fn matches_font_descriptor(&self, descriptor_to_match: &FontDescriptor) -> bool
Returns true if the given descriptor matches the one in this
FontTemplate
.Source§fn descriptor_distance(&self, descriptor_to_match: &FontDescriptor) -> f32
fn descriptor_distance(&self, descriptor_to_match: &FontDescriptor) -> f32
Calculate the distance from this
FontTemplate
s descriptor and return it
or None if this is not a valid FontTemplate
.Source§fn char_in_unicode_range(&self, character: char) -> bool
fn char_in_unicode_range(&self, character: char) -> bool
Whether or not this character is in the unicode ranges specified in
this temlates
@font-face
definition, if any.Source§impl MallocSizeOf for FontTemplateRef
impl MallocSizeOf for FontTemplateRef
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Auto Trait Implementations§
impl Freeze for FontTemplateRef
impl !RefUnwindSafe for FontTemplateRef
impl Send for FontTemplateRef
impl Sync for FontTemplateRef
impl Unpin for FontTemplateRef
impl !UnwindSafe for FontTemplateRef
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 moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert