Trait Encode

Source
pub trait Encode {
    // Required method
    fn as_str(&self) -> &str;

    // Provided methods
    fn encode(&self) -> Result<String, Box<dyn Error + '_>> { ... }
    fn encode_hex(&self, ch: char) -> String { ... }
    fn encode_digit(&self, ch: char) -> String { ... }
}

Required Methods§

Source

fn as_str(&self) -> &str

Provided Methods§

Source

fn encode(&self) -> Result<String, Box<dyn Error + '_>>

Source

fn encode_hex(&self, ch: char) -> String

Source

fn encode_digit(&self, ch: char) -> String

Implementations on Foreign Types§

Source§

impl Encode for &str

Source§

fn as_str(&self) -> &str

Source§

impl Encode for String

Source§

fn as_str(&self) -> &str

Implementors§