Enum std::num::IntErrorKind
1.55.0 · source · pub enum IntErrorKind {
Empty,
InvalidDigit,
PosOverflow,
NegOverflow,
Zero,
}
Expand description
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Empty
被解析的值是空的。
解析空字符串时将创建此变体。
InvalidDigit
在其上下文中包含无效数字。
除其他原因外,当解析包含非 ASCII 字符的字符串时,将创建这个变体。
当 +
或 -
单独放置在字符串中或放置在数字中间时,也会创建此变体。
PosOverflow
整数太大,无法存储为目标整数类型。
NegOverflow
整数太小,无法存储为目标整数类型。
Zero
值为零
当解析字符串的值为零时,将发出此变体,这对于非零类型是非法的。
Trait Implementations§
source§impl Clone for IntErrorKind
impl Clone for IntErrorKind
source§fn clone(&self) -> IntErrorKind
fn clone(&self) -> IntErrorKind
返回值的副本。 Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
从
source
执行复制分配。 Read moresource§impl Debug for IntErrorKind
impl Debug for IntErrorKind
source§impl PartialEq<IntErrorKind> for IntErrorKind
impl PartialEq<IntErrorKind> for IntErrorKind
impl Eq for IntErrorKind
impl StructuralEq for IntErrorKind
impl StructuralPartialEq for IntErrorKind
Auto Trait Implementations§
impl RefUnwindSafe for IntErrorKind
impl Send for IntErrorKind
impl Sync for IntErrorKind
impl Unpin for IntErrorKind
impl UnwindSafe for IntErrorKind
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
从拥有的值中借用。 Read more