1use core::fmt::Display;
4#[cfg(feature = "std")]
5use std::error::Error;
6
7#[derive(Debug, PartialEq)]
9pub enum Base16384DecodeError {
10 InvalidLength,
12 InvalidCharacter {
14 index: usize,
18 },
19}
20
21impl Display for Base16384DecodeError {
22 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
23 match self {
24 Self::InvalidLength => write!(f, "invalid length"),
25 Self::InvalidCharacter { index } => write!(f, "invalid character at index {}", index),
26 }
27 }
28}
29
30#[cfg(feature = "std")]
31impl Error for Base16384DecodeError {}