1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
//!
//! # Email Address Validator
//!
//! Email address validation library for Rust.
//!
//! The email address validation library provides a set of tools for validating email addresses according to the standard email address format.
//! It includes features such as parsing email addresses, validating domain names, and handling different types of email address formats.
//!
//! # Examples
//!
//! ```
//! use email_address_validator::{
//! Domain, DomainValidationOptionsBuilder, EmailAddress, EmailParseError,
//! ValidationOptionsBuilder
//! };
//!
//! fn main() -> Result<(), EmailParseError> {
//! let email = EmailAddress::try_parse(
//! "Testing User <test.user@example.com>",
//! &ValidationOptionsBuilder::new().build()
//! )?;
//!
//! // Prints Parsed Email: Testing User <test.user@example.com>
//! println!("Parsed Email: {}", email);
//!
//! // Prints Local Part: test.user
//! println!("Local Part: {}", email.local_part());
//!
//! // Prints Domain Part: example.com
//! println!("Domain Part: {}", email.domain());
//!
//! let domain = Domain::try_parse(
//! "[1234:5678:9abc:def0:1234:5678:9abc:def0]",
//! &DomainValidationOptionsBuilder::new().build()
//! )?;
//!
//! // Prints Domain: 1234:5678:9abc:def0:1234:5678:9abc:def0
//! println!("Domain: {}", domain.address());
//!
//! // Prints Domain Type: IpAddress
//! println!("Domain Type: {}", domain.domain_type());
//!
//! Ok(())
//! }
//! ```
//!
extern crate alloc;
pub use ;
pub use EmailAddress;
pub use ;
pub use ;