pub fn fmt_line(&mut self, line: &fmt::Display) -> fmt::Result {
        use std::fmt::Write;
        match self.0 {
            Multi::Line(ref name, ref mut f) => {
                try!(f.write_str(*name));
                try!(f.write_str(": "));
                try!(write!(NewlineReplacer(*f), "{}", line));
                f.write_str("\r\n")
            },
            Multi::Join(ref mut first, ref mut f) => {
                if !*first {
                    try!(f.write_str(", "));
                } else {
                    *first = false;
                }
                write!(NewlineReplacer(*f), "{}", line)
            }
            Multi::Raw(ref mut raw) => {
                let mut s = String::new();
                try!(write!(NewlineReplacer(&mut s), "{}", line));
                raw.push(s);
                Ok(())
            }
        }
    }
/// Format one 'line' of a header.
///
/// This writes the header name plus the `Display` value as a single line.
///
/// ## Note
///
/// This has the ability to format a header over multiple lines.
///
/// The main example here is `Set-Cookie`, which requires that every
/// cookie being set be specified in a separate line. Almost every other
/// case should only format as 1 single line.
Format one 'line' of a header.
This writes the header name plus the `Display` value as a single line.
Format one ' line ' of a header . This writes the header name plus the ` Display ` value as a single line .
pub fn fmt_line(&mut self, line: &fmt::Display) -> fmt::Result {
        use std::fmt::Write;
        match self.0 {
            Multi::Line(ref name, ref mut f) => {
                try!(f.write_str(*name));
                try!(f.write_str(": "));
                try!(write!(NewlineReplacer(*f), "{}", line));
                f.write_str("\r\n")
            },
            Multi::Join(ref mut first, ref mut f) => {
                if !*first {
                    try!(f.write_str(", "));
                } else {
                    *first = false;
                }
                write!(NewlineReplacer(*f), "{}", line)
            }
            Multi::Raw(ref mut raw) => {
                let mut s = String::new();
                try!(write!(NewlineReplacer(&mut s), "{}", line));
                raw.push(s);
                Ok(())
            }
        }
    }
pub fn fmt_line ( & mut self , line : & fmt :: Display ) -> fmt :: Result { use std :: fmt :: Write ; match self . 0 { Multi :: Line ( ref name , ref mut f ) => { try ! ( f write_str ( name ) ) ; try ! ( f write_str ( " " ) ) ; try ! ( write ( NewlineReplacer ( f ) " " line ) ) ; f . write_str ( " \r \n " ) } , Multi :: Join ( ref mut first , ref mut f ) => { if ! * first { try ! ( f write_str ( " " ) ) ; } else { * first = false ; } write ! ( NewlineReplacer ( f ) " " line ) } Multi :: Raw ( ref mut raw ) => { let mut s = String :: new ( ) ; try ! ( write ( NewlineReplacer ( mut s ) " " line ) ) ; raw . push ( s ) ; Ok ( ( ) ) } } }
Format one 'line' of a header.
Format one ' line ' of a header .
&mut self
line
&fmt::Display
&mut self
line
&fmt::Display
note
This has the ability to format a header over multiple lines.

The main example here is `Set-Cookie`, which requires that every
cookie being set be specified in a separate line. Almost every other
case should only format as 1 single line.
This has the ability to format a header over multiple lines . The main example here is ` Set - Cookie ` which requires that every cookie being set be specified in a separate line . Almost every other case should only format as 1 single line .