pub fn parse_hex_u32(hex_str: &str) -> Result<u32, ParseIntError>
Parses a hexadecimal string with an optional “0x” prefix into a u32.
u32
Returns an error if the string is not a valid hexadecimal number.