Trait Encoder

Source
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§