Skip to main content

FontsHolder

Trait FontsHolder 

Source
pub trait FontsHolder<Font> {
    // Required methods
    fn get_fonts(&self) -> &[Font];
    fn push_font(&mut self, font: Font) -> usize;
    fn delete_font(&mut self, index: usize);
}
Expand description

Storage contract used by FontManager.

Required Methods§

Source

fn get_fonts(&self) -> &[Font]

Returns all stored fonts.

Source

fn push_font(&mut self, font: Font) -> usize

Stores a font and returns the slot index.

Source

fn delete_font(&mut self, index: usize)

Marks the slot as removed or reusable.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<Font> FontsHolder<Font> for GenericFontsHolder<Font>