Enum lexical_util::error::Error [−][src]
#[non_exhaustive]
pub enum Error {
Show 49 variants
Overflow(usize),
Underflow(usize),
InvalidDigit(usize),
Empty(usize),
EmptyMantissa(usize),
EmptyExponent(usize),
EmptyInteger(usize),
EmptyFraction(usize),
InvalidPositiveMantissaSign(usize),
MissingMantissaSign(usize),
InvalidExponent(usize),
InvalidPositiveExponentSign(usize),
MissingExponentSign(usize),
ExponentWithoutFraction(usize),
InvalidLeadingZeros(usize),
MissingExponent(usize),
MissingSign(usize),
InvalidPositiveSign(usize),
InvalidNegativeSign(usize),
InvalidMantissaRadix,
InvalidExponentBase,
InvalidExponentRadix,
InvalidDigitSeparator,
InvalidDecimalPoint,
InvalidExponentSymbol,
InvalidBasePrefix,
InvalidBaseSuffix,
InvalidPunctuation,
InvalidExponentFlags,
InvalidMantissaSign,
InvalidExponentSign,
InvalidSpecial,
InvalidConsecutiveIntegerDigitSeparator,
InvalidConsecutiveFractionDigitSeparator,
InvalidConsecutiveExponentDigitSeparator,
InvalidFlags,
InvalidNanString,
NanStringTooLong,
InvalidInfString,
InfStringTooLong,
InvalidInfinityString,
InfinityStringTooLong,
InfinityStringTooShort,
InvalidFloatParseAlgorithm,
InvalidRadix,
InvalidFloatPrecision,
InvalidNegativeExponentBreak,
InvalidPositiveExponentBreak,
Success,
}
Expand description
Error code during parsing, indicating failure type.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Overflow(usize)
Integral overflow occurred during numeric parsing.
Tuple Fields of Overflow
0: usize
Underflow(usize)
Integral underflow occurred during numeric parsing.
Tuple Fields of Underflow
0: usize
InvalidDigit(usize)
Invalid digit found before string termination.
Tuple Fields of InvalidDigit
0: usize
Empty(usize)
Empty byte array found.
Tuple Fields of Empty
0: usize
EmptyMantissa(usize)
Empty mantissa found.
Tuple Fields of EmptyMantissa
0: usize
EmptyExponent(usize)
Empty exponent found.
Tuple Fields of EmptyExponent
0: usize
EmptyInteger(usize)
Empty integer found.
Tuple Fields of EmptyInteger
0: usize
EmptyFraction(usize)
Empty fraction found.
Tuple Fields of EmptyFraction
0: usize
InvalidPositiveMantissaSign(usize)
Invalid positive mantissa sign was found.
Tuple Fields of InvalidPositiveMantissaSign
0: usize
MissingMantissaSign(usize)
Mantissa sign was required(usize), but not found.
Tuple Fields of MissingMantissaSign
0: usize
InvalidExponent(usize)
Exponent was present but not allowed.
Tuple Fields of InvalidExponent
0: usize
InvalidPositiveExponentSign(usize)
Invalid positive exponent sign was found.
Tuple Fields of InvalidPositiveExponentSign
0: usize
MissingExponentSign(usize)
Exponent sign was required(usize), but not found.
Tuple Fields of MissingExponentSign
0: usize
ExponentWithoutFraction(usize)
Exponent was present without fraction component.
Tuple Fields of ExponentWithoutFraction
0: usize
InvalidLeadingZeros(usize)
Integer or integer component of float had invalid leading zeros.
Tuple Fields of InvalidLeadingZeros
0: usize
MissingExponent(usize)
No exponent with required exponent notation.
Tuple Fields of MissingExponent
0: usize
MissingSign(usize)
Integral sign was required(usize), but not found.
Tuple Fields of MissingSign
0: usize
InvalidPositiveSign(usize)
Invalid positive sign for an integer was found.
Tuple Fields of InvalidPositiveSign
0: usize
InvalidNegativeSign(usize)
Invalid negative sign for an unsigned type was found.
Tuple Fields of InvalidNegativeSign
0: usize
Invalid radix for the mantissa (significant) digits.
Invalid base for the exponent.
Invalid radix for the exponent digits.
Invalid digit separator character.
Invalid decimal point character.
Invalid symbol to represent exponent notation.
Invalid character for a base prefix.
Invalid character for a base suffix.
Invalid punctuation characters: multiple symbols overlap.
Optional exponent flags were set while disabling exponent notation.
Set no positive mantissa sign while requiring mantissa signs.
Set no positive exponent sign while requiring exponent signs.
Set optional special float flags while disable special floats.
Invalid consecutive integer digit separator.
Invalid consecutive fraction digit separator.
Invalid consecutive exponent digit separator.
Invalid flags were set without the format feature.
Invalid NaN string: must start with an n
character.
NaN string is too long.
Invalid short infinity string: must start with an i
character.
Short infinity string is too long.
Invalid long infinity string: must start with an i
character.
Long infinity string is too long.
Long infinity string is too short: it must be as long as short infinity.
Invalid float parsing algorithm.
Invalid radix for the significant digits.
Invalid precision flags for writing floats.
Invalid negative exponent break: break is above 0.
Invalid positive exponent break: break is below 0.
An error did not actually occur, and the result was successful.
Implementations
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
const fn check to see if an error is of a specific type.
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Error
impl UnwindSafe for Error
Blanket Implementations
Mutably borrows from an owned value. Read more