pub trait ValidateEmail {
    // Required method
    fn as_email_string(&self) -> Option<Cow<'_, str>>;

    // Provided method
    fn validate_email(&self) -> bool { ... }
}
Expand description

Validates whether the given string is an email based on the HTML5 spec. RFC 5322 is not practical in most circumstances and allows email addresses that are unfamiliar to most users.

Required Methods§

source

fn as_email_string(&self) -> Option<Cow<'_, str>>

Provided Methods§

Implementations on Foreign Types§

source§

impl ValidateEmail for Cow<'_, str>

source§

impl ValidateEmail for String

source§

impl<'a> ValidateEmail for &'a str

source§

impl<T> ValidateEmail for Option<T>
where T: ValidateEmail,

source§

impl<T> ValidateEmail for &T
where T: ValidateEmail,

Implementors§