Function preserves_schema::syntax::block::escape_bytes
source · pub fn escape_bytes(bs: &[u8]) -> String
Expand description
Escapes bs
into a Rust byte string literal, treating each byte as its ASCII equivalent
except producing \\
for 0x5c, \"
for 0x22, and \x..
for bytes outside the range
0x20..0x7e, inclusive.
This process is intended to generate literals compatible with rustc
; see the language
reference on “Byte string
literals”.