//! Hex text-encoding of a payload, applied when [`crate::protocol::flags::ConnectionParams::ENCODED`]
//! is set (see the transform order in
//! [`crate::protocol::message::ProtocolMessage::to_bytes`]). Mainly useful
//! for transports that can't safely carry arbitrary binary.
use ErrorArrayItem;
/// Hex-encodes `data` into its ASCII representation.
/// Reverses [`encode_data`]. Fails if `data` isn't valid UTF-8 or isn't a
/// valid hex string.