Skip to main content

Module parse_int

Module parse_int 

Source
Expand description

Parsing utilities.

Re-exports§

pub use parse_int::ParseIntError;
pub use parse_int::PrefixedHexError;
pub use parse_int::UnprefixedHexError;

Modules§

error
Error types for integer parsing utilities.

Traits§

Integer
Not strictly necessary but serves as a lint - avoids weird behavior if someone accidentally passes non-integer to the parse() function.

Functions§

hex_check_unprefixed
Checks a hex string does not have a prefix 0x (or 0X).
hex_remove_prefix
Removes the prefix 0x (or 0X) from a hex string.
hex_u16
Parses a u16 from a hex string.
hex_u32
Parses a u32 from a hex string.
hex_u64
Parses a u64 from a hex string.
hex_u16_prefixed
Parses a u16 from a prefixed hex string.
hex_u16_unprefixed
Parses a u16 from an unprefixed hex string.
hex_u32_prefixed
Parses a u32 from a prefixed hex string.
hex_u32_unprefixed
Parses a u32 from an unprefixed hex string.
hex_u64_prefixed
Parses a u64 from a prefixed hex string.
hex_u64_unprefixed
Parses a u64 from an unprefixed hex string.
hex_u128
Parses a u128 from a hex string.
hex_u128_prefixed
Parses a u128 from a prefixed hex string.
hex_u128_unprefixed
Parses a u128 from an unprefixed hex string.
int_from_box
Parses the input string as an integer returning an error carrying rich context.
int_from_str
Parses the input string as an integer returning an error carrying rich context.
int_from_string
Parses the input string as an integer returning an error carrying rich context.