serde_email/
is_valid_email.rs

1use ::email_address::EmailAddress;
2use ::std::convert::AsRef;
3
4/// Tests if the given string is a valid email or not.
5///
6/// The underlying implementation is by the [email_address crate](https://crates.io/crates/email_address).
7pub fn is_valid_email<S>(raw: S) -> bool
8where
9    S: AsRef<str>,
10{
11    EmailAddress::is_valid(raw.as_ref())
12}