pub enum Error {
Parse(ParseError),
Font(FontError),
Unsupported {
what: String,
},
Malformed {
what: String,
},
InvalidOption {
what: String,
},
}Expand description
Crate-level error.
Unsupported input is never rendered. Error::Parse wraps tokenizer/parser
failures; Error::Font wraps face/glyph failures; Error::Unsupported
is a construct or feature out of scope; Error::Malformed is a bad value
that parsed as the wrong shape; Error::InvalidOption is a render option
out of range.
Variants§
Parse(ParseError)
Tokenizer or parser rejected the input.
Font(FontError)
Font bytes or a requested glyph could not be used.
Unsupported
A feature listed as out of scope, or not yet implemented.
Callers must treat this as failure. The renderer does not invent output.
Malformed
Syntactically invalid value (for example a color spec with the wrong
number of components). Distinct from Self::Unsupported.
InvalidOption
A render option is out of range (for example PNG DPI of 0 or above 2400).
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()