pub struct FontMap { /* private fields */ }
Implementations§
Source§impl FontMap
impl FontMap
pub fn insert(&mut self, name: impl Into<Cow<'static, str>>, font: Font)
pub fn remove(&mut self, name: &str) -> Option<Font>
pub fn index_of(&self, name: &str) -> Option<usize>
pub fn get(&self, name: &str) -> Option<&Font>
pub fn keys(&self) -> &[Cow<'static, str>]
pub fn values(&self) -> &[Font]
pub fn iter(&self) -> impl Iterator<Item = (&Cow<'static, str>, &Font)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FontMap
impl RefUnwindSafe for FontMap
impl Send for FontMap
impl Sync for FontMap
impl Unpin for FontMap
impl UnwindSafe for FontMap
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