pub trait Format {
    // Required methods
    fn encode(&self, bytes: &[u8]) -> String;
    fn decode(&self, s: &str) -> Result<Vec<u8>, EvalError>;
}
Expand description

An encoding format.

Required Methods§

source

fn encode(&self, bytes: &[u8]) -> String

Encodes a byte slice into its string representation according to this format.

source

fn decode(&self, s: &str) -> Result<Vec<u8>, EvalError>

Decodes a byte slice from its string representation according to this format.

Implementors§