std::hex
std/src/hex.mo
Hex codecs: lowercase output, case-insensitive input.
std's SHA-256 keeps its byte→hex helper private, so the general form
lives here: pure and portable, the single home for hex.
pub type HexError {
/// An odd number of characters: the last nibble has no partner.
odd_length,
/// A character outside `0-9 a-f A-F`.
invalid_char
}Why a hex string was rejected. to_string is the only render point.
pub def HexError.to_string (e : HexError) : Stringpub def Hex.encode (bs : List U8) : Stringpub def Hex.decode (s : String) : Result HexError (List U8)