Trait bincode::enc::Encoder

source ·
pub trait Encoder: Sealed {
    type W: Writer;
    type C: Config;

    // Required methods
    fn writer(&mut self) -> &mut Self::W;
    fn config(&self) -> &Self::C;
}
Expand description

Helper trait to encode basic types into.

Required Associated Types§

source

type W: Writer

The concrete Writer type

source

type C: Config

The concrete Config type

Required Methods§

source

fn writer(&mut self) -> &mut Self::W

Returns a mutable reference to the writer

source

fn config(&self) -> &Self::C

Returns a reference to the config

Implementations on Foreign Types§

source§

impl<'a, T> Encoder for &'a mut T
where T: Encoder,

§

type W = <T as Encoder>::W

§

type C = <T as Encoder>::C

source§

fn writer(&mut self) -> &mut Self::W

source§

fn config(&self) -> &Self::C

Implementors§

source§

impl<W: Writer, C: Config> Encoder for EncoderImpl<W, C>

§

type W = W

§

type C = C