Encode

Trait Encode 

Source
pub trait Encode {
    // Required method
    fn encode(b: &[u8]) -> String;
}
Expand description

A trait that represents how data can be converted from bytes to a string.

Generally structs that implement Decode will be unit-like structs that just implement the one required method.

Required Methods§

Source

fn encode(b: &[u8]) -> String

Convert bytes to a string. This method cannot fail.

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§