pub fn from_one_raw_str<T: str::FromStr>(raw: &[Vec<u8>]) -> Option<T> {
    if raw.len() != 1 {
        return None;
    }
    // we JUST checked that raw.len() == 1, so raw[0] WILL exist.
    match str::from_utf8(&raw[0][]) {
        Ok(s) => str::FromStr::from_str(s),
        Err(_) => None
    }
}
/// Reads a single raw string when parsing a header
Reads a single raw string when parsing a header
Reads a single raw string when parsing a header
pub fn from_one_raw_str<T: str::FromStr>(raw: &[Vec<u8>]) -> Option<T> {
    if raw.len() != 1 {
        return None;
    }
    // we JUST checked that raw.len() == 1, so raw[0] WILL exist.
    match str::from_utf8(&raw[0][]) {
        Ok(s) => str::FromStr::from_str(s),
        Err(_) => None
    }
}
pub fn from_one_raw_str < T : str :: FromStr > ( raw : & [ Vec < u8 > ] ) -> Option < T > { if raw . len ( ) != 1 { return None ; } // we JUST checked that raw.len() == 1, so raw[0] WILL exist. match str :: from_utf8 ( & raw [ 0 ] [ ] ) { Ok ( s ) => str :: FromStr :: from_str ( s ) , Err ( _ ) => None } }
Reads a single raw string when parsing a header
Reads a single raw string when parsing a header
raw
&[Vec<u8>]
raw
&[Vec<u8>]