Crate custom_type

source ·
Expand description

This crate provides utilities for parsing and validating various types of data such as emails, passwords, and phone numbers with country codes.

§Example

use custom_type::{Email, PhoneNumber, RawPassword, CountryCode};

let email = Email::parse("example@example.com").unwrap();
println!("{}", email);

let phone_number = PhoneNumber::parse(CountryCode::USA, "1234567890").unwrap();
println!("{}", phone_number);

let password = RawPassword::parse_strict("Valid123!").unwrap();
println!("{}", password);

§Features

  • Parse and validate email addresses.
  • Parse and validate phone numbers with country codes.
  • Parse and validate passwords with different strength levels.

Modules§

Structs§

  • This crate provides a simple and efficient way to parse and validate email addresses.
  • This crate provides functionality to parse and validate phone numbers with country codes.
  • This crate provides functionality to parse and validate raw passwords with different levels of strength.

Enums§

  • CountryCode : Enum representing country codes