Trait local_encoding::Encoder
[−]
[src]
pub trait Encoder { fn to_string(&self, data: &[u8]) -> Result<String>; fn to_bytes(&self, data: &str) -> Result<Vec<u8>>; }
Converter between string and multibyte encoding.
Required Methods
fn to_string(&self, data: &[u8]) -> Result<String>
Convert from bytes to string.
fn to_bytes(&self, data: &str) -> Result<Vec<u8>>
Convert from string to bytes.
Implementors
impl Encoder for EncoderUtf8
impl Encoder for Encoding