pub struct ConfigBuilder(/* private fields */);Expand description
Builder for Config.
Implementations§
Source§impl ConfigBuilder
impl ConfigBuilder
Sourcepub fn strictness(self, s: Strictness) -> Self
pub fn strictness(self, s: Strictness) -> Self
Set RFC strictness level.
Sourcepub fn strip_subaddress(self) -> Self
pub fn strip_subaddress(self) -> Self
Strip subaddress from canonical form.
Sourcepub fn preserve_subaddress(self) -> Self
pub fn preserve_subaddress(self) -> Self
Keep subaddress in canonical form (default).
Sourcepub fn subaddress_separator(self, sep: char) -> Self
pub fn subaddress_separator(self, sep: char) -> Self
Set the subaddress separator character (default: +).
Sourcepub fn dots_gmail_only(self) -> Self
pub fn dots_gmail_only(self) -> Self
Strip dots only for Gmail/Googlemail.
Sourcepub fn dots_always_strip(self) -> Self
pub fn dots_always_strip(self) -> Self
Always strip dots from local part.
Sourcepub fn dots_preserve(self) -> Self
pub fn dots_preserve(self) -> Self
Preserve dots (default).
Sourcepub fn lowercase_all(self) -> Self
pub fn lowercase_all(self) -> Self
Lowercase both local part and domain.
Sourcepub fn lowercase_domain(self) -> Self
pub fn lowercase_domain(self) -> Self
Lowercase domain only (default, RFC-correct).
Sourcepub fn preserve_case(self) -> Self
pub fn preserve_case(self) -> Self
Preserve original case for local part (domain is always lowercased per RFC 5321).
Sourcepub fn domain_check_psl(self) -> Self
pub fn domain_check_psl(self) -> Self
Validate domain against Public Suffix List (requires psl feature).
Sourcepub fn domain_check_tld(self) -> Self
pub fn domain_check_tld(self) -> Self
Validate domain has a recognized TLD.
Sourcepub fn check_confusables(self) -> Self
pub fn check_confusables(self) -> Self
Enable anti-homoglyph confusable detection.
Sourcepub fn allow_domain_literal(self) -> Self
pub fn allow_domain_literal(self) -> Self
Allow domain literals like [192.168.1.1].
Sourcepub fn allow_display_name(self) -> Self
pub fn allow_display_name(self) -> Self
Allow display names like "John Doe" <john@example.com>.
Sourcepub fn allow_single_label_domain(self) -> Self
pub fn allow_single_label_domain(self) -> Self
Do not require a dot in the domain (allow single-label domains).
Sourcepub fn domain_check_syntax(self) -> Self
pub fn domain_check_syntax(self) -> Self
Syntax-only domain check (default). Resets from Psl/Tld back to syntax.