Struct skrifa::NamedInstanceCollection
source · pub struct NamedInstanceCollection<'a> { /* private fields */ }
Expand description
Collection of named instances in a variable font.
See the NamedInstance
type for more detail.
Implementations§
source§impl<'a> NamedInstanceCollection<'a>
impl<'a> NamedInstanceCollection<'a>
sourcepub fn new(font: &impl TableProvider<'a>) -> Self
pub fn new(font: &impl TableProvider<'a>) -> Self
Creates a new instance collection from the given font.
sourcepub fn get(&self, index: usize) -> Option<NamedInstance<'a>>
pub fn get(&self, index: usize) -> Option<NamedInstance<'a>>
Returns the instance at the given index.
sourcepub fn iter(&self) -> impl Iterator<Item = NamedInstance<'a>> + 'a + Clone
pub fn iter(&self) -> impl Iterator<Item = NamedInstance<'a>> + 'a + Clone
Returns an iterator over the instances in the collection.
Trait Implementations§
source§impl<'a> Clone for NamedInstanceCollection<'a>
impl<'a> Clone for NamedInstanceCollection<'a>
source§fn clone(&self) -> NamedInstanceCollection<'a>
fn clone(&self) -> NamedInstanceCollection<'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 moreAuto Trait Implementations§
impl<'a> Freeze for NamedInstanceCollection<'a>
impl<'a> RefUnwindSafe for NamedInstanceCollection<'a>
impl<'a> Send for NamedInstanceCollection<'a>
impl<'a> Sync for NamedInstanceCollection<'a>
impl<'a> Unpin for NamedInstanceCollection<'a>
impl<'a> UnwindSafe for NamedInstanceCollection<'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
)