Trait Codec

Source
pub trait Codec:
    Encoder
    + Decoder
    + Sized {
    // Provided methods
    fn encode(self) -> <Self as Encoder>::Encoder { ... }
    fn decode(self) -> <Self as Decoder>::Decoder { ... }
}
Expand description

Gives the ability to en- / decode bytes to / from ANSI background colors.

Provided Methods§

Source

fn encode(self) -> <Self as Encoder>::Encoder

Encode bytes into ANSI colors.

Source

fn decode(self) -> <Self as Decoder>::Decoder

Decode ANSI color codes into bytes.

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§

Source§

impl<T> Codec for T
where T: Encoder + Decoder + Sized,