1use thiserror::Error;
2
3#[derive(Error, Debug, PartialEq)]
4pub enum Error {
5 #[error("missing key: `{0}`")]
7 MissingKey(&'static str),
8
9 #[error("could not parse a boolean value")]
11 ParseBoolError(#[from] std::str::ParseBoolError),
12
13 #[error("could not parse an integer")]
15 ParseIntError(#[from] std::num::ParseIntError),
16
17 #[error("could not parse a floating-point number")]
19 ParseFloatError(#[from] std::num::ParseFloatError),
20
21 #[error("could not parse a network address")]
23 AddrParseError(#[from] std::net::AddrParseError),
24
25 #[error("infallible")]
26 Infallible(#[from] std::convert::Infallible),
27}