pub fn decode_to_array<const N: usize>(
hex: &str,
) -> Result<[u8; N], DecodeFixedLengthBytesError>Expand description
Decodes a hex string with an expected length known at compile time.
If you don’t know the required length at compile time you need to use decode_to_vec
instead.
§Errors
Returns an error if hex contains invalid characters or has incorrect length. (Should be
N * 2.)