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§
sourcefn marshal_binary(&self) -> Result<Vec<u8>>
fn marshal_binary(&self) -> Result<Vec<u8>>
Marshal the object into a binary form and return it as a new vector.
sourcefn unmarshal_binary(&mut self, data: &[u8]) -> Result<usize>
fn unmarshal_binary(&mut self, data: &[u8]) -> Result<usize>
Unmarshal from the given byte slice reference and modify self
.