pub trait Decode {
// Required method
fn as_str(&self) -> &str;
// Provided methods
fn decode(&self) -> Result<Cow<'_, str>, Box<dyn Error + '_>> { ... }
fn decode_hex(&self, code: &str) -> IResult<&str, Cow<'_, str>, Error<&str>> { ... }
fn decode_digit(
&self,
code: &str,
) -> IResult<&str, Cow<'_, str>, Error<&str>> { ... }
}