[−][src]Trait hexutil::ParseHex
Parse a hexadecimal value.
struct Test(u16); hexutil::impl_from_hex!(Test, 2, |data| Ok(Self(u16::from_le_bytes(data)))); let test: Test = "3412".parse_hex().unwrap(); assert_eq!(test, Test(0x1234));
Required methods
fn parse_hex<T: FromHex>(self) -> Result<T, FromHexError>
Parse the hexadecimal string representation and create a value of type T
.