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>> { ... }
}Required Methods§
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>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".