Trait swiss_army_knife::strings::parse_number::ParseNumber [−][src]
pub trait ParseNumber: Sized {}Show methods
fn parse_hexadecimal_number_lower_case_fixed_width(
bytes: &[u8],
fixed_width: usize
) -> Result<Self, ParseNumberError> { ... } fn parse_hexadecimal_number_lower_case_with_0x_prefix_fixed_width(
bytes: &[u8],
fixed_width: usize
) -> Result<Self, ParseNumberError> { ... } fn parse_octal_number_fixed_width(
bytes: &[u8],
fixed_width: usize
) -> Result<Self, ParseNumberError> { ... } fn parse_binary_number_case_with_0b_prefix(
bytes: &[u8]
) -> Result<Self, ParseNumberError> { ... } fn parse_octal_number_case_with_0o_prefix(
bytes: &[u8]
) -> Result<Self, ParseNumberError> { ... } fn parse_octal_number_case_with_0_prefix(
bytes: &[u8]
) -> Result<Self, ParseNumberError> { ... } fn parse_hexadecimal_number_lower_case_with_0x_prefix(
bytes: &[u8]
) -> Result<Self, ParseNumberError> { ... } fn parse_hexadecimal_number_upper_case_with_0x_prefix(
bytes: &[u8]
) -> Result<Self, ParseNumberError> { ... } fn parse_hexadecimal_number_upper_or_lower_case_with_0x_prefix(
bytes: &[u8]
) -> Result<Self, ParseNumberError> { ... } fn parse_octal_number(bytes: &[u8]) -> Result<Self, ParseNumberError> { ... } fn parse_decimal_number(bytes: &[u8]) -> Result<Self, ParseNumberError> { ... } fn parse_hexadecimal_number_lower_case(
bytes: &[u8]
) -> Result<Self, ParseNumberError> { ... } fn parse_hexadecimal_number_upper_case(
bytes: &[u8]
) -> Result<Self, ParseNumberError> { ... } fn parse_hexadecimal_number_upper_or_lower_case(
bytes: &[u8]
) -> Result<Self, ParseNumberError> { ... } fn parse_number_known_case(
bytes: &[u8],
radix: Radix,
non_numeric_digit_case: NonNumericDigitCase
) -> Result<Self, ParseNumberError> { ... } fn parse_number_upper_or_lower_case(
bytes: &[u8],
radix: Radix
) -> Result<Self, ParseNumberError> { ... }
Expand description
Parse a number from bytes.
Provided methods
fn parse_hexadecimal_number_lower_case_fixed_width(
bytes: &[u8],
fixed_width: usize
) -> Result<Self, ParseNumberError>
fn parse_hexadecimal_number_lower_case_fixed_width(
bytes: &[u8],
fixed_width: usize
) -> Result<Self, ParseNumberError>
Parses a lower-case hexadecimal number which should be of fixed width.
fn parse_hexadecimal_number_lower_case_with_0x_prefix_fixed_width(
bytes: &[u8],
fixed_width: usize
) -> Result<Self, ParseNumberError>
fn parse_hexadecimal_number_lower_case_with_0x_prefix_fixed_width(
bytes: &[u8],
fixed_width: usize
) -> Result<Self, ParseNumberError>
Parses a lower-case hexadecimal number which should be of fixed width and should start 0x
.
fn parse_octal_number_fixed_width(
bytes: &[u8],
fixed_width: usize
) -> Result<Self, ParseNumberError>
fn parse_octal_number_fixed_width(
bytes: &[u8],
fixed_width: usize
) -> Result<Self, ParseNumberError>
Parses an octal number.
fn parse_binary_number_case_with_0b_prefix(
bytes: &[u8]
) -> Result<Self, ParseNumberError>
fn parse_binary_number_case_with_0b_prefix(
bytes: &[u8]
) -> Result<Self, ParseNumberError>
Parses an octal number which should start ‘0o’.
fn parse_octal_number_case_with_0o_prefix(
bytes: &[u8]
) -> Result<Self, ParseNumberError>
fn parse_octal_number_case_with_0o_prefix(
bytes: &[u8]
) -> Result<Self, ParseNumberError>
Parses an octal number which should start ‘0o’.
fn parse_octal_number_case_with_0_prefix(
bytes: &[u8]
) -> Result<Self, ParseNumberError>
fn parse_octal_number_case_with_0_prefix(
bytes: &[u8]
) -> Result<Self, ParseNumberError>
Parses an octal number which should start ‘0’.
fn parse_hexadecimal_number_lower_case_with_0x_prefix(
bytes: &[u8]
) -> Result<Self, ParseNumberError>
fn parse_hexadecimal_number_lower_case_with_0x_prefix(
bytes: &[u8]
) -> Result<Self, ParseNumberError>
Parses a lower-case hexadecimal number which should start ‘0x’.
fn parse_hexadecimal_number_upper_case_with_0x_prefix(
bytes: &[u8]
) -> Result<Self, ParseNumberError>
fn parse_hexadecimal_number_upper_case_with_0x_prefix(
bytes: &[u8]
) -> Result<Self, ParseNumberError>
Parses an upper-case hexadecimal number which should start ‘0x’.
fn parse_hexadecimal_number_upper_or_lower_case_with_0x_prefix(
bytes: &[u8]
) -> Result<Self, ParseNumberError>
fn parse_hexadecimal_number_upper_or_lower_case_with_0x_prefix(
bytes: &[u8]
) -> Result<Self, ParseNumberError>
Parses a hexadecimal number with any mixture of alphabet casing which should start ‘0x’.
fn parse_octal_number(bytes: &[u8]) -> Result<Self, ParseNumberError>
fn parse_octal_number(bytes: &[u8]) -> Result<Self, ParseNumberError>
Parses an octal number.
fn parse_decimal_number(bytes: &[u8]) -> Result<Self, ParseNumberError>
fn parse_decimal_number(bytes: &[u8]) -> Result<Self, ParseNumberError>
Parses a decimal number.
fn parse_hexadecimal_number_lower_case(
bytes: &[u8]
) -> Result<Self, ParseNumberError>
fn parse_hexadecimal_number_lower_case(
bytes: &[u8]
) -> Result<Self, ParseNumberError>
Parses a lower-case hexadecimal number.
fn parse_hexadecimal_number_upper_case(
bytes: &[u8]
) -> Result<Self, ParseNumberError>
fn parse_hexadecimal_number_upper_case(
bytes: &[u8]
) -> Result<Self, ParseNumberError>
Parses an upper-case hexadecimal number.
fn parse_hexadecimal_number_upper_or_lower_case(
bytes: &[u8]
) -> Result<Self, ParseNumberError>
fn parse_hexadecimal_number_upper_or_lower_case(
bytes: &[u8]
) -> Result<Self, ParseNumberError>
Parses a hexadecimal number with any mixture of alphabet casing.
fn parse_number_known_case(
bytes: &[u8],
radix: Radix,
non_numeric_digit_case: NonNumericDigitCase
) -> Result<Self, ParseNumberError>
fn parse_number_known_case(
bytes: &[u8],
radix: Radix,
non_numeric_digit_case: NonNumericDigitCase
) -> Result<Self, ParseNumberError>
Parses a number with a known (upper or lower) case or returns an error.
fn parse_number_upper_or_lower_case(
bytes: &[u8],
radix: Radix
) -> Result<Self, ParseNumberError>
fn parse_number_upper_or_lower_case(
bytes: &[u8],
radix: Radix
) -> Result<Self, ParseNumberError>
Parses a number with any mixture of alphabet casing or returns an error.
Implementations on Foreign Types
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>
fn parse_number(
bytes: &[u8],
radix: Radix,
parse_byte: impl Fn(Radix, u8) -> Result<u8, ParseNumberError>
) -> Result<Self, ParseNumberError>