Trait Marshal

Source
pub trait Marshal {
    // Required methods
    fn marshal_binary(&self) -> Result<Vec<u8>>;
    fn unmarshal_binary(&mut self, data: &[u8]) -> Result<usize>;
}
Expand description

The Marshal trait is used for marshaling and unmarshaling MKVS trees.

Required Methods§

Source

fn marshal_binary(&self) -> Result<Vec<u8>>

Marshal the object into a binary form and return it as a new vector.

Source

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

Unmarshal from the given byte slice reference and modify self.

Implementations on Foreign Types§

Source§

impl Marshal for u16

Source§

fn marshal_binary(&self) -> Result<Vec<u8>>

Source§

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

Source§

impl Marshal for u32

Source§

fn marshal_binary(&self) -> Result<Vec<u8>>

Source§

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

Source§

impl Marshal for u64

Source§

fn marshal_binary(&self) -> Result<Vec<u8>>

Source§

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

Implementors§