0.2.9 - This version may not be safe as it has not been updated for a long time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform
Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.
MIT - MIT LicenseA Rust crate providing an implementation of an RFC-compliant EmailAddress newtype.
Primarily for validation, the EmailAddress type is constructed with
FromStr::from_str which will raise any parsing errors. Prior to constructions
the functions is_valid, is_valid_local_part, and is_valid_domain may also be
used to test for validity without constructing an instance.
Currently, it supports all the RFC ASCII and UTF-8 character set rules as well as quoted and unquoted local parts but does not yet support all the productions required for SMTP headers; folding whitespace, comments, etc.
use email_address::*;
assert!(EmailAddress::is_valid("user.name+tag+sorting@example.com"));
assert_eq!(
EmailAddress::from_str("Abc.example.com"),
Error::MissingSeparator.into()
);Eq.Option type.Option type documentation.SubDomainEmpty when empty instead of
InvalidCharacter.Thanks to ghandic, blaine-arcjet, Thomasdezeeuw.
PartialEq with case insensitive comparison for
domain part.Hash, because above.new_unchecked to be more flexible.as_str helper method.EmailAddress::new_unchecked function (Sören Meier).Send and Sync implementation, and fixed documentation bug
(Sören Meier).From<EmailAddress> for String.AsRef<str for EmailAddress.local_part and domain accessors.to_uri now supports URI encoding the address as a part of the URI.is_valid_local_part and is_valid_domain methods.domain-literal values, only does surface syntax check.