Skip to main content

Crate qos_hex

Crate qos_hex 

Source
Expand description

§qos_hex

Utilities for encoding and decoding hex strings in QuorumOS crates.

Use encode and encode_to_vec to produce lowercase hex, and decode, decode_to_buf, decode_from_vec, or FromHex to decode hex into byte buffers, arrays, or vectors.

Enable the serde feature for #[serde(with = "qos_hex::serde")] helpers, including optional hex-encoded fields through qos_hex::serde::option.

Enums§

HexError
Error type for decoding hex strings.

Traits§

FromHex
Types that can be decoded from a hex string.

Functions§

decode
Decode bytes from a hex encoded string.
decode_from_vec
Decode bytes from a hex byte slice.
decode_to_buf
Decode raw_s into a mutable buffer slice. Length of buf must exactly match the length of the bytes represented by raw_s.
encode
Encode a byte slice to hex string. Always encodes with lowercase characters.
encode_to_vec
Encode a byte slice to a hex-encoded byte slice.