pub trait Encoder {
// Required methods
fn encoded_len(bin_len: usize) -> Result<usize, Error>;
fn encode<IN: AsRef<[u8]>>(
encoded: &mut [u8],
bin: IN,
) -> Result<&[u8], Error>;
// Provided methods
fn encode_to_str<IN: AsRef<[u8]>>(
encoded: &mut [u8],
bin: IN,
) -> Result<&str, Error> { ... }
fn encode_to_string<IN: AsRef<[u8]>>(bin: IN) -> Result<String, Error> { ... }
}
Required Methods§
Provided Methods§
Object Safety§
This trait is not object safe.