#[non_exhaustive]pub enum RatioErrorKind {
ParseError,
ZeroDenominator,
Overflow,
}Expand description
The specific type of error that occurred during parsing.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ParseError
The string could not be parsed as a ratio.
This occurs if the input string does not match the expected format (e.g., contains invalid characters or is empty).
ZeroDenominator
The denominator was zero.
Ratios cannot have a zero denominator.
Overflow
The parsed value cannot be represented by the target type.
This occurs if the numerator, denominator, or intermediate values
overflow the capacity of the integer type T.
Trait Implementations§
Source§impl Clone for RatioErrorKind
impl Clone for RatioErrorKind
Source§fn clone(&self) -> RatioErrorKind
fn clone(&self) -> RatioErrorKind
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 RatioErrorKind
impl Debug for RatioErrorKind
Source§impl Display for RatioErrorKind
impl Display for RatioErrorKind
Source§impl Hash for RatioErrorKind
impl Hash for RatioErrorKind
Source§impl PartialEq for RatioErrorKind
impl PartialEq for RatioErrorKind
impl Copy for RatioErrorKind
impl Eq for RatioErrorKind
impl StructuralPartialEq for RatioErrorKind
Auto Trait Implementations§
impl Freeze for RatioErrorKind
impl RefUnwindSafe for RatioErrorKind
impl Send for RatioErrorKind
impl Sync for RatioErrorKind
impl Unpin for RatioErrorKind
impl UnwindSafe for RatioErrorKind
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