Skip to main content

encode_response

Function encode_response 

Source
pub fn encode_response(tag: u16, response: &Response) -> Vec<u8> ⓘ
Expand description

Serialize an R-message (including length prefix) from a Response.

This is the server-side write path; the client-side reader uses parse_response. tag is threaded in explicitly since it is a property of the request being answered, not of the response payload.