finish helper functions

This commit is contained in:
Vlasislav Kashin
2025-06-29 18:56:22 +03:00
parent 5f8bdd4b39
commit aa4220ed2d
16 changed files with 16910 additions and 6 deletions

View File

@@ -0,0 +1,24 @@
mod helper_constants;
pub mod helper_functions;
mod enums;
mod phonenumberutil;
mod regex_and_mappings;
pub use enums::{MatchType, PhoneNumberFormat, PhoneNumberType, ValidationResultErr, ValidNumberLenType};
use thiserror::Error;
#[derive(Debug, Error)]
pub enum ErrorType {
#[error("No parsing")]
NoParsingError,
#[error("Invalid country code")]
InvalidCountryCodeError, // INVALID_COUNTRY_CODE in the java version.
#[error("Not a number")]
NotANumber,
#[error("Too short after idd")]
TooShortAfterIdd,
#[error("Too short Nsn")]
TooShortNsn,
#[error("Too long nsn")]
TooLongNsn, // TOO_LONG in the java version.
}