pub trait TryFromHex
where 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§

source

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

Try to convert Self from hex.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TryFromHex for i8

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for i16

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for i32

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for i64

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for i128

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for isize

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for u8

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for u16

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for u32

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for u64

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for u128

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for usize

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for Vec<u8>

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 1]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 2]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 3]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 4]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 5]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 6]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 7]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 8]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 9]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 10]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 11]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 12]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 13]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 14]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 15]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 16]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 17]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 18]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 19]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 20]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 21]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 22]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 23]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 24]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 25]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 26]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 27]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 28]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 29]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 30]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 31]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 32]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 33]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 34]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 35]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 36]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 37]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 38]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 39]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 40]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 41]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 42]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 43]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 44]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 45]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 46]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 47]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 48]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 49]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 50]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 51]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 52]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 53]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 54]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 55]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 56]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 57]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 58]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 59]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 60]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 61]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 62]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 63]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 64]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 128]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 256]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

source§

impl TryFromHex for [u8; 512]

source§

fn try_from_hex<H>(hex: H) -> Result<Self>
where H: AsRef<[u8]>,

Implementors§