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()
}
/// Replaces each marker byte M with ESC || M.
Replaces each marker byte M with ESC || M.
Replaces each marker byte M with ESC || M .
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()
}
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 ( ) }
Replaces each marker byte M with ESC || M.
Replaces each marker byte M with ESC || M .
representation
&[u8]
representation
&[u8]