Trait Codex

Source
pub trait Codex<A, B> {
    type Encoder<U, V>: Encode<U, Output = V>;
    type Decoder<U, V>: Decode<U, Output = V>;

    // Required methods
    fn encode(&self) -> Self::Encoder<A, B>;
    fn decode() -> Self::Decoder<B, A>;
}

Required Associated Types§

Source

type Encoder<U, V>: Encode<U, Output = V>

Source

type Decoder<U, V>: Decode<U, Output = V>

Required Methods§

Source

fn encode(&self) -> Self::Encoder<A, B>

Source

fn decode() -> Self::Decoder<B, A>

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§