pub trait Encoder {
    type Error: Error;

    // Required methods
    fn to_text(&self, input: &[u8]) -> String;
    fn from_text(&self, input: &str) -> Result<Vec<u8>, Self::Error>;
}
Expand description

The trait for encoders to encode to / decode from string.

Required Associated Types§

Required Methods§

source

fn to_text(&self, input: &[u8]) -> String

source

fn from_text(&self, input: &str) -> Result<Vec<u8>, Self::Error>

Implementors§