pub fn make_headers_sendable(&self) -> Vec<u8> {
        let mut vec = Vec::with_capacity(self.headers.len() * 4 * 40);
        for pair in &self.headers {
            vec.append(&mut pair.0.as_bytes().to_vec());
            vec.append(&mut ": ".as_bytes().to_vec());
            vec.append(&mut pair.1.as_bytes().to_vec());
            vec.append(&mut "\r\n".as_bytes().to_vec());
        }
        vec
    }
/// Makes the response header into a sendable byte vector
Makes the response header into a sendable byte vector
Makes the response header into a sendable byte vector
pub fn make_headers_sendable(&self) -> Vec<u8> {
        let mut vec = Vec::with_capacity(self.headers.len() * 4 * 40);
        for pair in &self.headers {
            vec.append(&mut pair.0.as_bytes().to_vec());
            vec.append(&mut ": ".as_bytes().to_vec());
            vec.append(&mut pair.1.as_bytes().to_vec());
            vec.append(&mut "\r\n".as_bytes().to_vec());
        }
        vec
    }
pub fn make_headers_sendable ( & self ) -> Vec < u8 > { let mut vec = Vec :: with_capacity ( self . headers . len ( ) * 4 * 40 ) ; for pair in & self . headers { vec . append ( & mut pair . 0 . as_bytes ( ) . to_vec ( ) ) ; vec . append ( & mut " " . as_bytes ( ) . to_vec ( ) ) ; vec . append ( & mut pair . 1 . as_bytes ( ) . to_vec ( ) ) ; vec . append ( & mut " \r \n " . as_bytes ( ) . to_vec ( ) ) ; } vec }
Makes the response header into a sendable byte vector
Makes the response header into a sendable byte vector
&self
&self