1use crate::{maybestd::io::Error as IoError, TreeID};
2
3#[derive(Debug)]
4#[cfg_attr(feature = "std", derive(thiserror::Error))]
5pub enum Error {
6 #[cfg_attr(feature = "std", error("Out of bounds"))]
7 OutOfBounds,
8
9 #[cfg_attr(feature = "std", error("Overflow error"))]
10 Overflow,
11
12 #[cfg_attr(feature = "std", error("I/O error: {0}"))]
13 IO(#[cfg_attr(feature = "std", from)] IoError),
14
15 #[cfg_attr(feature = "std", error("missing node: {0:?}"))]
16 MissingNode(TreeID),
17
18 #[cfg_attr(feature = "std", error("unable to provide/verify proof: {0}"))]
19 ProofError(&'static str),
20}