/// Returns an iterator that produces an escaped version of a `u8`.
///
/// The default is chosen with a bias toward producing literals that are
/// legal in a variety of languages, including C++11 and similar C-family
/// languages. The exact rules are:
///
/// - Tab, CR and LF are escaped as '\t', '\r' and '\n' respectively.
/// - Single-quote, double-quote and backslash chars are backslash-escaped.
/// - Any other chars in the range [0x20,0x7e] are not escaped.
/// - Any other chars are given hex escapes of the form '\xNN'.
/// - Unicode escapes are never generated by this function.
///
Returns an iterator that produces an escaped version of a `u8`.
The default is chosen with a bias toward producing literals that are
legal in a variety of languages, including C++11 and similar C-family
languages. The exact rules are.


Returns an iterator that produces an escaped version of a ` u8 ` . The default is chosen with a bias toward producing literals that are legal in a variety of languages including C ++ 11 and similar C - family languages . The exact rules are .
pub fn escape_default(c: u8) -> EscapeDefault {
    let (data, len) = match c {
        b'\t' => ([b'\\', b't', 0, 0], 2),
        b'\r' => ([b'\\', b'r', 0, 0], 2),
        b'\n' => ([b'\\', b'n', 0, 0], 2),
        b'\\' => ([b'\\', b'\\', 0, 0], 2),
        b'\'' => ([b'\\', b'\'', 0, 0], 2),
        b'"' => ([b'\\', b'"', 0, 0], 2),
        b'\x20' ... b'\x7e' => ([c, 0, 0, 0], 1),
        _ => ([b'\\', b'x', hexify(c >> 4), hexify(c & 0xf)], 4),
    };
    return EscapeDefault { range: (0.. len), data: data };
    fn hexify(b: u8) -> u8 {
        match b {
            0 ... 9 => b'0' + b,
            _ => b'a' + b - 10,
        }
    }
}
pub fn escape_default ( c : u8 ) -> EscapeDefault { let ( data , len ) = match c { b'\t' => ( [ b'\\' , b't' , 0 , 0 ] , 2 ) , b'\r' => ( [ b'\\' , b'r' , 0 , 0 ] , 2 ) , b'\n' => ( [ b'\\' , b'n' , 0 , 0 ] , 2 ) , b'\\' => ( [ b'\\' , b'\\' , 0 , 0 ] , 2 ) , b'\'' => ( [ b'\\' , b'\'' , 0 , 0 ] , 2 ) , b'"' => ( [ b'\\' , b'"' , 0 , 0 ] , 2 ) , b'\x20' ... b'\x7e' => ( [ c , 0 , 0 , 0 ] , 1 ) , _ => ( [ b'\\' , b'x' , hexify ( c >> 4 ) , hexify ( c & 0xf ) ] , 4 ) , } ; return EscapeDefault { range : ( 0 .. len ) , data : data } ; fn hexify ( b : u8 ) -> u8 { match b { 0 ... 9 => b'0' + b , _ => b'a' + b - 10 , } } }
Returns an iterator that produces an escaped version of a `u8`.
Returns an iterator that produces an escaped version of a ` u8 ` .
c
u8