yaml_path/error.rs
1use std::error::Error;
2use std::fmt::{Display, Formatter};
3
4#[derive(Debug, Eq, PartialEq)]
5pub enum PathError {
6 ParseError,
7 NotAHash,
8 NotAnIndex,
9 TooManyNodes,
10 NodeNotFound,
11 NotAString,
12 NotAnInteger,
13}
14
15impl Display for PathError {
16 fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
17 write!(f, "{:?}", &self)
18 }
19}
20
21impl Error for PathError {
22
23}