Expand description
Hexadecimal encoding and decoding with streaming support.
Provides upper/lowercase hex codecs with chunked encoding, streaming decoders, and utilities for formatting and parsing hex strings.
Re-exports§
pub use super::Array;pub use super::ArrayStr;pub use super::DecodeError;pub use super::Result;
Structs§
- Decoder
- A streaming hex decoder that converts hex characters to bytes.
- Encoder
- Iterator that encodes bytes as individual hex ASCII characters.
Enums§
- Encoding
- Character set for hex encoding (uppercase or lowercase).
Constants§
Functions§
- decode
- Decodes a hex string into a vector of bytes.
- decode_
len - Returns the decoded length for a given hex string length.
- decode_
mut - Decodes a hex string in-place, writing to a destination buffer.
- decode_
n - Decodes hex at compile time with validation.
- encode
- Encodes bytes to lowercase hex, returning an
Encoder. - encode_
len - Returns the exact encoded length for a given source byte length.
- encode_
mut - Encodes bytes to lowercase hex into a flat byte buffer.
- encode_
n - Encodes bytes to lowercase hex at compile time.
- parse_
byte - Parses two hex characters into a byte.
- parse_
nibble - Safely parses a hex character into a nibble (0-15).
- skip_0x
- Skips the
0xor0Xprefix from a byte slice if present. - skip_
leading_ zeros - Skips leading zero characters from a byte slice.
Type Aliases§
- Char
Encoder - Iterator that encodes bytes as hex characters (
chartype).