1#[cfg(feature = "serde")]
2use serde::{Deserialize, Serialize};
3
4#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6#[derive(Copy, Clone, Debug)]
7pub enum ParseError {
8 InvalidRequest,
10}
11
12impl ParseError {
13 pub fn new() -> Self {
15 Self::InvalidRequest
16 }
17}
18
19pub struct Fail {
21 pub error: ParseError,
23}
24
25impl Fail {
26 pub fn new(error: ParseError) -> Self {
28 Self { error }
29 }
30}
31
32pub struct PexError {
34 pub kind: PexErrorKind,
36}
37
38impl PexError {
39 pub fn new(kind: PexErrorKind) -> Self {
41 Self { kind }
42 }
43}
44
45pub enum PexErrorKind {
47 SyntaxError {},
49}
50
51impl PexErrorKind {
52 pub fn new_syntax_error() -> Self {
54 Self::SyntaxError {}
55 }
56}