[][src]Trait rdms::Serialize

pub trait Serialize: Sized {
    fn encode(&self, buf: &mut Vec<u8>) -> usize;
fn decode(&mut self, buf: &[u8]) -> Result<usize>; }

Serialize values to binary sequence of bytes.

Required methods

fn encode(&self, buf: &mut Vec<u8>) -> usize

Convert this value into binary equivalent. Encoded bytes shall be appended to the input-buffer buf. Return bytes encoded.

fn decode(&mut self, buf: &[u8]) -> Result<usize>

Reverse process of encode, given the binary equivalent buf, construct self.

Loading content...

Implementations on Foreign Types

impl Serialize for Vec<u8>[src]

impl Serialize for i32[src]

impl Serialize for i64[src]

Loading content...

Implementors

impl Serialize for Empty[src]

Loading content...