Trait pcap_parser::ToVec[][src]

pub trait ToVec {
    fn to_vec_raw(&self) -> Result<Vec<u8>, GenError>;

    fn to_vec(&mut self) -> Result<Vec<u8>, GenError> { ... }
fn fix(&mut self) { ... } }
Expand description

Common trait for all serialization functions

Required methods

Serialize to bytes representation (little-endian). Do not check values

Provided methods

Serialize to bytes representation (little-endian). Check values and fix all fields before serializing.

Check and correct all fields: use magic, fix lengths fields and other values if possible.

Implementors