fn ion_hash_escape()

in amazon-qldb-driver-core/src/ion_compat.rs [71:81]


fn ion_hash_escape(representation: &[u8]) -> Bytes {
    let mut out = BytesMut::with_capacity(representation.len());
    for byte in representation {
        if let B | E | ESC = *byte {
            out.put_u8(0x0C);
        }
        out.put_u8(*byte);
    }

    out.freeze()
}