codepage437 0.1.0

Tools for dealing with various bitmap fonts, specifically IBM Codepage 437
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::{error, fmt};

/// Error to indicate a string cannot be represented with Codepage 437 glyphs
#[derive(Clone, Debug, PartialEq)]
pub enum CP437Error {
    NoEquivalentGlyph,
}

impl fmt::Display for CP437Error {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        match self {
            CP437Error::NoEquivalentGlyph => write!(f, "No equivalent glyph for character"),
        }
    }
}

impl error::Error for CP437Error {}