Encoding

Trait Encoding 

Source
pub trait Encoding {
    // Required methods
    fn decode(s: &str) -> FastCryptoResult<Vec<u8>>;
    fn encode<T: AsRef<[u8]>>(data: T) -> String;
}
Expand description

Trait representing a general binary-to-string encoding.

Required Methods§

Source

fn decode(s: &str) -> FastCryptoResult<Vec<u8>>

Decode this encoding into bytes.

Source

fn encode<T: AsRef<[u8]>>(data: T) -> String

Encode bytes into a string.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§