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

pub fn format_into<T, W>(data: T, f: W) -> Result<(), Error> where
    T: AsRef<[u8]>,
    W: Write

Write hex-encoded octets into the given fmt::Write.

This function writes UTF-8 encoded octets into the given writer. This function does not allocate, but the given writer may.

Examples

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

Errors

If the formatter returns an error, that error is returned.