Struct swash::FontDataRef
source · 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)