Enum lexical_core::ErrorCode [−][src]
#[repr(i32)] pub enum ErrorCode {}Show variants
Overflow, Underflow, InvalidDigit, Empty, EmptyMantissa, EmptyExponent, EmptyInteger, EmptyFraction, InvalidPositiveMantissaSign, MissingMantissaSign, InvalidExponent, InvalidPositiveExponentSign, MissingExponentSign, ExponentWithoutFraction, InvalidLeadingZeros, // some variants omitted
Error code, indicating failure type.
Error messages are designating by an error code of less than 0. This is to be compatible with C conventions. This enumeration is FFI-compatible for interfacing with C code.
FFI
For interfacing with FFI-code, this may be approximated by:
const int32_t OVERFLOW = -1;
const int32_t UNDERFLOW = -2;
const int32_t INVALID_DIGIT = -3;
const int32_t EMPTY = -4;
const int32_t EMPTY_FRACTION = -5;
const int32_t EMPTY_EXPONENT = -6;
Safety
Assigning any value outside the range [-6, -1]
to value of type
ErrorCode may invoke undefined-behavior.
Variants
Integral overflow occurred during numeric parsing.
Numeric overflow takes precedence over the presence of an invalid digit.
Integral underflow occurred during numeric parsing.
Numeric overflow takes precedence over the presence of an invalid digit.
Invalid digit found before string termination.
Empty byte array found.
Empty mantissa found.
Empty exponent found.
Empty integer found.
Empty fraction found.
Invalid positive mantissa sign was found.
Mantissa sign was required, but not found.
Exponent was present but not allowed.
Invalid positive exponent sign was found.
Exponent sign was required, but not found.
Exponent was present without fraction component.
Integer had invalid leading zeros.
Trait Implementations
impl Clone for ErrorCode
[src]
impl Copy for ErrorCode
[src]
impl Debug for ErrorCode
[src]
impl Eq for ErrorCode
[src]
impl From<ErrorCode> for Error
[src]
impl Ord for ErrorCode
[src]
fn cmp(&self, other: &ErrorCode) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<ErrorCode> for ErrorCode
[src]
fn eq(&self, other: &ErrorCode) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<ErrorCode> for ErrorCode
[src]
fn partial_cmp(&self, other: &ErrorCode) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for ErrorCode
[src]
impl StructuralPartialEq for ErrorCode
[src]
Auto Trait Implementations
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnwindSafe for ErrorCode
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,