/// Create a new RTSP response header.
Create a new RTSP response header.
Create a new RTSP response header .
fn new(
        code: i32, 
        line: String, 
        headers: Vec<Header>) -> ResponseHeader {
        let mut res = ResponseHeader {
            code:       code,
            line:       line,
            headers:    headers,
            header_map: HashMap::new()
        };
        for i in 0..res.headers.len() {
            let &(ref name, _) = res.headers.get(i).unwrap();
            res.header_map.insert(name.to_lowercase(), i);
        }
        res
    }
fn new ( code : i32 , line : String , headers : Vec < Header > ) -> ResponseHeader { let mut res = ResponseHeader { code : code , line : line , headers : headers , header_map : HashMap :: new ( ) } ; for i in 0 .. res . headers . len ( ) { let & ( ref name , _ ) = res . headers . get ( i ) . unwrap ( ) ; res . header_map . insert ( name . to_lowercase ( ) , i ) ; } res }
Create a new RTSP response header.
Create a new RTSP response header .
code
i32
line
String
headers
Vec<Header>