pub enum ParseDecimalError {
Empty,
Invalid,
PrecLimitExceeded,
MaxValueExceeded,
}
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<P>
.
Variants§
Empty
An empty string has been given as literal.
Invalid
The given string is not a valid decimal literal.
PrecLimitExceeded
The given decimal literal has more fractional digits than specified by
the type parameter P
.
MaxValueExceeded
The given decimal literal would exceed the maximum value representable by the type.
Trait Implementations§
Source§impl Clone for ParseDecimalError
impl Clone for ParseDecimalError
Source§fn clone(&self) -> ParseDecimalError
fn clone(&self) -> ParseDecimalError
Returns a duplicate 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)>
Returns 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 for ParseDecimalError
impl PartialEq for ParseDecimalError
impl Eq for ParseDecimalError
impl StructuralPartialEq for ParseDecimalError
Auto Trait Implementations§
impl Freeze for ParseDecimalError
impl RefUnwindSafe for ParseDecimalError
impl Send for ParseDecimalError
impl Sync for ParseDecimalError
impl Unpin for ParseDecimalError
impl UnwindSafe for ParseDecimalError
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
Mutably borrows from an owned value. Read more