#[non_exhaustive]pub enum IntErrorKind {
Empty,
InvalidDigit,
PosOverflow,
NegOverflow,
Zero,
}
Expand description
Enum to store the various types of errors that can cause parsing an integer to fail.
§Example
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Empty
Value being parsed is empty.
This variant will be constructed when parsing an empty string.
InvalidDigit
Contains an invalid digit in its context.
Among other causes, this variant will be constructed when parsing a string that contains a non-ASCII char.
This variant is also constructed when a +
or -
is misplaced within a string
either on its own or in the middle of a number.
PosOverflow
Integer is too large to store in target integer type.
NegOverflow
Integer is too small to store in target integer type.
Zero
Value was Zero
This variant will be emitted when the parsing string has a value of zero, which would be illegal for non-zero types.
Trait Implementations§
1.55.0 · Source§impl Clone for IntErrorKind
impl Clone for IntErrorKind
Source§fn clone(&self) -> IntErrorKind
fn clone(&self) -> IntErrorKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)where
Self:,
fn clone_from(&mut self, source: &Self)where
Self:,
source
. Read more