pub trait TryFromHexwhere
Self: Sized,{
// Required method
fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>;
}
Expand description
Try to convert the given hex to a specific type.
§Examples
use array_bytes::TryFromHex;
assert_eq!(u128::try_from_hex("0x5201314"), Ok(85_988_116));
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.