Enum fpdec_core::ParseDecimalError
source · pub enum ParseDecimalError {
Empty,
Invalid,
FracDigitLimitExceeded,
InternalOverflow,
}
Expand description
An error which can be returned when parsing a decimal literal.
This error is used as the error type for the FromStr
implementation of
Decimal
.
Variants§
Empty
An empty string has been given as literal.
Invalid
The given string is not a valid decimal literal.
FracDigitLimitExceeded
The given decimal literal has more fractional digits than specified by
MAX_N_FRAC_DIGITS
.
InternalOverflow
The given decimal literal would exceed the internal representation of
Decimal
.
Trait Implementations§
source§impl Clone for ParseDecimalError
impl Clone for ParseDecimalError
source§fn clone(&self) -> ParseDecimalError
fn clone(&self) -> ParseDecimalError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ParseDecimalError
impl Debug for ParseDecimalError
source§impl Display for ParseDecimalError
impl Display for ParseDecimalError
source§impl Error for ParseDecimalError
impl Error for ParseDecimalError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl PartialEq<ParseDecimalError> for ParseDecimalError
impl PartialEq<ParseDecimalError> for ParseDecimalError
source§fn eq(&self, other: &ParseDecimalError) -> bool
fn eq(&self, other: &ParseDecimalError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.