pub fn write_escaped<P: AsRef<[u8]>>(s: P, w: &mut impl Write) -> Result<()>
Given a byte sequence, writes it in escaped form to the passed writer. Does not add surrounding quotes.