use pyo3::prelude::*;
use std::net::IpAddr;
#[pyclass]
pub struct ValidatedEmail {
#[pyo3(get)]
pub original: String,
#[pyo3(get)]
pub normalized: String,
#[pyo3(get)]
pub ascii_email: Option<String>,
#[pyo3(get)]
pub local_part: String,
#[pyo3(get)]
pub domain_address: Option<IpAddr>,
#[pyo3(get)]
pub domain_name: String,
#[pyo3(get)]
pub ascii_domain: String,
#[pyo3(get)]
pub is_deliverable: bool,
}
#[pyclass]
pub struct EmailValidator {
pub allow_smtputf8: bool,
pub allow_empty_local: bool,
pub allow_quoted_local: bool,
pub allow_domain_literal: bool,
pub deliverable_address: bool,
pub allowed_special_domains: Vec<String>,
}
impl Default for EmailValidator {
fn default() -> Self {
Self {
allow_smtputf8: true,
allow_empty_local: false,
allow_quoted_local: false,
allow_domain_literal: false,
deliverable_address: true,
allowed_special_domains: Vec::new(),
}
}
}