pub enum RatioFromStrError {
DivisionByZero,
MultipleSlashes,
NonNumericCharactersInFractions,
MultipleScientificNotations,
MultipleDecimalPoints,
ExponentPartIsNotAnInteger,
ParsingBigIntError(ParseBigIntError),
}
Expand description
The ratio string is invalid and cannot be parsed.
Variants§
DivisionByZero
The ratio string is divided by zero.
MultipleSlashes
The ratio string contains multiple slashes.
For example, “1/2/3”.
NonNumericCharactersInFractions
The ratio string contains non-numeric characters in fractions.
For example, “1/2A”.
MultipleScientificNotations
The ratio string contains multiple scientific notations.
For example, “1.5E6E6”.
MultipleDecimalPoints
The ratio string contains multiple decimal points.
For example, “1.5.6”.
ExponentPartIsNotAnInteger
The exponent part of the ratio string is not an integer.
For example, “1.5E6.5”.
ParsingBigIntError(ParseBigIntError)
The ratio string is deficient in some other way.
Trait Implementations§
Source§impl Debug for RatioFromStrError
impl Debug for RatioFromStrError
Source§impl Display for RatioFromStrError
impl Display for RatioFromStrError
Source§impl Error for RatioFromStrError
impl Error for RatioFromStrError
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 RatioFromStrError
impl PartialEq for RatioFromStrError
impl StructuralPartialEq for RatioFromStrError
Auto Trait Implementations§
impl Freeze for RatioFromStrError
impl RefUnwindSafe for RatioFromStrError
impl Send for RatioFromStrError
impl Sync for RatioFromStrError
impl Unpin for RatioFromStrError
impl UnwindSafe for RatioFromStrError
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more