evtc_parse/
error.rs

1use std::{io, string};
2use thiserror::Error;
3
4/// A possible error occurring during parsing.
5#[derive(Debug, Error)]
6pub enum ParseError {
7    // Read related error.
8    #[error(transparent)]
9    IoError(#[from] io::Error),
10
11    /// String conversion error.
12    #[error(transparent)]
13    FromUtf8Error(#[from] string::FromUtf8Error),
14
15    /// Unsupported EVTC revision.
16    #[error("unsupported evtc revision {0}")]
17    UnsupportedRevision(u8),
18
19    /// Data is not in EVTC format.
20    #[error("not in evtc format")]
21    NotEvtc,
22}