Codec

Trait Codec 

Source
pub trait Codec: Encoder + Decoder {
    // Required 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.

Required 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.

Implementors§

Source§

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