Skip to main content

decode_generic

Function decode_generic 

Source
pub const fn decode_generic(
    src: &[u8],
    dst: &mut [MaybeUninit<u8>],
) -> Result<(), InvalidInput>
Expand description

decode(), but const-evaluable at the cost of performance.

Macro decode! is useful when you want to decode hexadecimal string to a byte array in const contexts, such as creating a const variable or a static variable.

ยงErrors

The input and output lengths do not match (src.len() == 2 * dst.len()), or the input contains invalid hexadecimal characters.