Skip to main content

ScanFromHex

Trait ScanFromHex 

Source
pub trait ScanFromHex<'a>: Sized {
    // Required method
    fn scan_from_hex<I: ScanInput<'a>>(s: I) -> Result<(Self, usize), ScanError>;
}
Expand description

This trait defines scanning a type from a hexadecimal representation.

This should be implemented to match implementations of std::fmt::LowerHex and std::fmt::UpperHex.

Required Methods§

Source

fn scan_from_hex<I: ScanInput<'a>>(s: I) -> Result<(Self, usize), ScanError>

Perform a scan on the given input.

See: ScanFromStr::scan_from.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a> ScanFromHex<'a> for i8

Source§

fn scan_from_hex<I: ScanInput<'a>>(s: I) -> Result<(Self, usize), ScanError>

Source§

impl<'a> ScanFromHex<'a> for i16

Source§

fn scan_from_hex<I: ScanInput<'a>>(s: I) -> Result<(Self, usize), ScanError>

Source§

impl<'a> ScanFromHex<'a> for i32

Source§

fn scan_from_hex<I: ScanInput<'a>>(s: I) -> Result<(Self, usize), ScanError>

Source§

impl<'a> ScanFromHex<'a> for i64

Source§

fn scan_from_hex<I: ScanInput<'a>>(s: I) -> Result<(Self, usize), ScanError>

Source§

impl<'a> ScanFromHex<'a> for isize

Source§

fn scan_from_hex<I: ScanInput<'a>>(s: I) -> Result<(Self, usize), ScanError>

Source§

impl<'a> ScanFromHex<'a> for u8

Source§

fn scan_from_hex<I: ScanInput<'a>>(s: I) -> Result<(Self, usize), ScanError>

Source§

impl<'a> ScanFromHex<'a> for u16

Source§

fn scan_from_hex<I: ScanInput<'a>>(s: I) -> Result<(Self, usize), ScanError>

Source§

impl<'a> ScanFromHex<'a> for u32

Source§

fn scan_from_hex<I: ScanInput<'a>>(s: I) -> Result<(Self, usize), ScanError>

Source§

impl<'a> ScanFromHex<'a> for u64

Source§

fn scan_from_hex<I: ScanInput<'a>>(s: I) -> Result<(Self, usize), ScanError>

Source§

impl<'a> ScanFromHex<'a> for usize

Source§

fn scan_from_hex<I: ScanInput<'a>>(s: I) -> Result<(Self, usize), ScanError>

Implementors§