pub fn encode_frame(headers: &[(&str, &str)], payload: &[u8]) -> Vec<u8> ⓘExpand description
Encode a single eventstream frame from a list of (name, value)
string headers and a payload byte slice. Returns the bytes ready to
be written to the response body.