pub trait Encoder {
// Required methods
fn enc_name() -> &'static str;
fn dec_name() -> &'static str;
fn test_name() -> &'static str;
fn encode(data: &[u8], quality: Option<u32>) -> Result<Vec<u8>>;
fn decode(data: &[u8]) -> Result<Vec<u8>>;
fn test(data: &[u8]) -> bool;
}
Required Methods§
fn enc_name() -> &'static str
fn dec_name() -> &'static str
fn test_name() -> &'static str
fn encode(data: &[u8], quality: Option<u32>) -> Result<Vec<u8>>
fn decode(data: &[u8]) -> Result<Vec<u8>>
fn test(data: &[u8]) -> bool
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.