Trait FontCodegenExt

Source
pub trait FontCodegenExt {
    // Required methods
    fn gen_enum(&self, name: &str) -> TokenStream;
    fn gen_enum_entry(
        glyph: &Glyph,
        tracking: &mut HashSet<String>,
    ) -> TokenStream;
    fn gen_enum_comments(&self) -> Vec<String>;
}
Available on crate feature codegen only.
Expand description

Trait used to perform code generation for a font

Required Methods§

Source

fn gen_enum(&self, name: &str) -> TokenStream

Generates an enum representing the glyphs in the font

Source

fn gen_enum_entry(glyph: &Glyph, tracking: &mut HashSet<String>) -> TokenStream

Generates a single entry in the enum for a glyph

Source

fn gen_enum_comments(&self) -> Vec<String>

Generates the comments for the enum

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§