use std::fmt;
use thiserror::Error;
#[allow(clippy::module_name_repetitions)]
#[derive(Debug, Error, Clone, Copy, PartialEq)]
pub enum FromStrError
{
#[error("Input failed regex verification. Isn't in the expected structure for a Yolol number.")]
InputVerificationFailure,
#[error("A sign on the Yolol number was matched, but isn't any expected character.")]
InvalidSignMatched,
#[error("Failed to parse the main digits (left of the decimal) into the Yolol number backing type.")]
MainDigitsParseError,
#[error("No main digits (left of the decimal) were matched in regex verification.")]
NoMainDigits,
#[error("!!CRITICAL!! A logic error in calculating how many decimal digits (right of the decimal) to extract has occurred.")]
DecimalSliceLenLogicError,
#[error("!!CRITICAL!! A logic error in calculating the power to shift extracted decimal digits (right of the decimal) by has occurred.")]
DecimalShiftPowLogicError,
#[error("Failed to convert the shift power into the Yolol number backing type.")]
ShiftConversionFailure,
#[error("Failed to convert corrected decimal digits (right of the decimal) into the Yolol number backing type.")]
DecimalDigitsParseError,
#[error("Failed to convert the split number (left and right sides of the decimal) into one joined Yolol number.")]
FromSplitCreationFailure
}
impl From<FromStrError> for String
{
fn from(input: FromStrError) -> Self
{
input.to_string()
}
}