hayro_postscript/
error.rs1use core::fmt;
4
5pub type Result<T> = core::result::Result<T, Error>;
7
8#[derive(Debug, Clone, PartialEq, Eq)]
10pub enum Error {
11 SyntaxError,
13 LimitCheck,
15 UnsupportedType,
18}
19
20impl fmt::Display for Error {
21 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
22 match self {
23 Self::SyntaxError => f.write_str("syntaxerror"),
24 Self::LimitCheck => f.write_str("limitcheck"),
25 Self::UnsupportedType => f.write_str("unsupported type"),
26 }
27 }
28}
29
30impl core::error::Error for Error {}