pub trait Encoding {
// Required methods
fn encode(bytes: &[u8]) -> String;
fn decode<E: Error>(string: &str) -> Result<Vec<u8>, E>;
}
Expand description
A trait for encoding bytes into strings.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.