Enum concordium_std::num::IntErrorKind [−][src]
#[non_exhaustive] pub enum IntErrorKind { Empty, InvalidDigit, PosOverflow, NegOverflow, Zero, }
🔬 This is a nightly-only experimental API. (int_error_matching
)
it can be useful to match errors when making error messages for integer parsing
Expand description
Enum to store the various types of errors that can cause parsing an integer to fail.
Example
#![feature(int_error_matching)] if let Err(e) = i32::from_str_radix("a12", 10) { println!("Failed conversion to i32: {:?}", e.kind()); }
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
🔬 This is a nightly-only experimental API. (int_error_matching
)
it can be useful to match errors when making error messages for integer parsing
Expand description
Value being parsed is empty.
Among other causes, this variant will be constructed when parsing an empty string.
🔬 This is a nightly-only experimental API. (int_error_matching
)
it can be useful to match errors when making error messages for integer parsing
Expand description
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.
🔬 This is a nightly-only experimental API. (int_error_matching
)
it can be useful to match errors when making error messages for integer parsing
Expand description
Integer is too large to store in target integer type.
🔬 This is a nightly-only experimental API. (int_error_matching
)
it can be useful to match errors when making error messages for integer parsing
Expand description
Integer is too small to store in target integer type.
🔬 This is a nightly-only experimental API. (int_error_matching
)
it can be useful to match errors when making error messages for integer parsing
Expand description
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
impl Clone for IntErrorKind
[src]
impl Clone for IntErrorKind
[src]pub fn clone(&self) -> IntErrorKind
[src]
pub fn clone(&self) -> IntErrorKind
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for IntErrorKind
[src]
impl Debug for IntErrorKind
[src]impl PartialEq<IntErrorKind> for IntErrorKind
[src]
impl PartialEq<IntErrorKind> for IntErrorKind
[src]impl Eq for IntErrorKind
[src]
impl StructuralEq for IntErrorKind
[src]
impl StructuralPartialEq for IntErrorKind
[src]
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
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more