[][src]Function artichoke_backend::extn::stdlib::securerandom::hex::encode_into

pub fn encode_into<T>(data: T, buf: &mut String) where
    T: AsRef<[u8]>, 

Encode arbitrary octets as base16 into the given String.

This function writes encoded octets into the given String. This function will allocate at most once.

Examples

let data = b"Artichoke Ruby";
let mut buf = String::new();
scolapasta_hex::encode_into(data, &mut buf);
assert_eq!(buf, "4172746963686f6b652052756279");