Trait array_bytes::TryFromHex
source · 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("0x1a2b3c4d5e6f"), Ok(28772997619311));
Required Methods§
Object Safety§
This trait is not object safe.