pub fn write_all<T: Write>(&self, buf: &mut T) -> Result<(), WriteError> {
        for (key, val) in &self.headers {
            buf.write_all(key.raw())?;
            buf.write_all(&[COLON, SP])?;
            buf.write_all(&val.as_bytes())?;
            buf.write_all(&[CR, LF])?;
        }

        // The header section ends with a CRLF.
        buf.write_all(&[CR, LF])?;

        Ok(())
    }
/// Writes the headers to `buf` using the HTTP specification.
Writes the headers to `buf` using the HTTP specification.
Writes the headers to ` buf ` using the HTTP specification .
pub fn write_all<T: Write>(&self, buf: &mut T) -> Result<(), WriteError> {
        for (key, val) in &self.headers {
            buf.write_all(key.raw())?;
            buf.write_all(&[COLON, SP])?;
            buf.write_all(&val.as_bytes())?;
            buf.write_all(&[CR, LF])?;
        }
        // The header section ends with a CRLF.
        buf.write_all(&[CR, LF])?;
        Ok(())
    }
pub fn write_all < T : Write > ( & self , buf : & mut T ) -> Result < ( ) , WriteError > { for ( key , val ) in & self . headers { buf . write_all ( key . raw ( ) ) ? ; buf . write_all ( & [ COLON , SP ] ) ? ; buf . write_all ( & val . as_bytes ( ) ) ? ; buf . write_all ( & [ CR , LF ] ) ? ; } // The header section ends with a CRLF. buf . write_all ( & [ CR , LF ] ) ? ; Ok ( ( ) ) }
Writes the headers to `buf` using the HTTP specification.
Writes the headers to ` buf ` using the HTTP specification .
&self
buf
&mut T
&self
buf
&mut T