KVEncode

Trait KVEncode 

Source
pub trait KVEncode<W>
where W: IoWrite,
{ // Required method fn encode(&self, writer: &mut W) -> Result<usize, Error<W::Error>>; }
Expand description

A key-value encoder that writes a single key, value pair.

Required Methods§

Source

fn encode(&self, writer: &mut W) -> Result<usize, Error<W::Error>>

Encode this key‑value pair to the writer and return the number of bytes written.

Implementations on Foreign Types§

Source§

impl<W: IoWrite, K: Encode<W>, V: Encode<W>> KVEncode<W> for (K, V)

Source§

fn encode(&self, writer: &mut W) -> Result<usize, Error<W::Error>>

Source§

impl<W: IoWrite, KV: KVEncode<W>> KVEncode<W> for &KV

Source§

fn encode(&self, writer: &mut W) -> Result<usize, Error<W::Error>>

Implementors§