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

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

Write hex-encoded octets into the given io::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 = Vec::new();
scolapasta_hex::write_into(data, &mut buf);
assert_eq!(buf, b"4172746963686f6b652052756279".to_vec());

Errors

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