Skip to main content

encode_frame

Function encode_frame 

Source
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.