Function loco_protocol::command::codec::encode::encode_head[][src]

pub fn encode_head(command: &Command) -> Result<Vec<u8>, Error>
Expand description

Encode header and data_size to bytes. The result Vec’s length is same with HEADER_SIZE + 4.