FontFormat

Trait FontFormat 

Source
pub trait FontFormat: Sized {
    type Error: Error + 'static;

    const DEFAULT_FILE_EXTENSION: &'static str;

    // Required method
    fn parse(b: &[u8]) -> Result<Self, Self::Error>;
}
Expand description

Trait satisfied by font formats (like .tfm files).

Required Associated Constants§

Required Associated Types§

Source

type Error: Error + 'static

Required Methods§

Source

fn parse(b: &[u8]) -> Result<Self, Self::Error>

Parse binary data into a font.

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§