pub trait FontCodegenExt {
// Required methods
fn gen_enum(&self, name: &str) -> TokenStream;
fn gen_enum_entry(glyph: &Glyph) -> 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§
Sourcefn gen_enum(&self, name: &str) -> TokenStream
fn gen_enum(&self, name: &str) -> TokenStream
Generates an enum representing the glyphs in the font
Sourcefn gen_enum_entry(glyph: &Glyph) -> TokenStream
fn gen_enum_entry(glyph: &Glyph) -> TokenStream
Generates a single entry in the enum for a glyph
Sourcefn gen_enum_comments(&self) -> Vec<String>
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.