pub struct FontDataRef<'a> { /* private fields */ }
Expand description
Reference to the content of a font file.
Implementations§
Source§impl<'a> FontDataRef<'a>
impl<'a> FontDataRef<'a>
Sourcepub fn new(data: &'a [u8]) -> Option<Self>
pub fn new(data: &'a [u8]) -> Option<Self>
Creates font data from the specified bytes. Returns None
if the bytes
cannot trivially be determined to represent a font.
Sourcepub fn is_collection(&self) -> bool
pub fn is_collection(&self) -> bool
Returns true if the data represents a font collection.
Trait Implementations§
Source§impl<'a> Clone for FontDataRef<'a>
impl<'a> Clone for FontDataRef<'a>
Source§fn clone(&self) -> FontDataRef<'a>
fn clone(&self) -> FontDataRef<'a>
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 moreSource§impl<'a> IntoIterator for FontDataRef<'a>
impl<'a> IntoIterator for FontDataRef<'a>
impl<'a> Copy for FontDataRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for FontDataRef<'a>
impl<'a> RefUnwindSafe for FontDataRef<'a>
impl<'a> Send for FontDataRef<'a>
impl<'a> Sync for FontDataRef<'a>
impl<'a> Unpin for FontDataRef<'a>
impl<'a> UnwindSafe for FontDataRef<'a>
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