pub struct Provider {
pub canonical_domain: &'static str,
pub domains: &'static [&'static str],
/* private fields */
}Expand description
A mail provider’s aliasing rules.
Fields§
§canonical_domain: &'static strThe domain of its canonical addresses (gmail.com), empty for
Provider::GENERIC.
PHP: getCanonicalDomain().
domains: &'static [&'static str]The domains that belong to it.
PHP: getSupportedDomains().
Implementations§
Source§impl Provider
impl Provider
Sourcepub const YAHOO: Provider
pub const YAHOO: Provider
Yahoo, Ymail and Rocketmail: keeps the local part (a -keyword is a
separate address, not an alias).
Sourcepub const PROTONMAIL: Provider
pub const PROTONMAIL: Provider
Proton Mail: drops +tags, keeps dots and the domain (each Proton
domain is a separate address).
Sourcepub fn of(domain: &[u8]) -> &'static Provider
pub fn of(domain: &[u8]) -> &'static Provider
The provider of PROVIDERS the domain belongs to, else
Provider::GENERIC.
PHP: getProviderForDomain().
Sourcepub fn supports(&self, domain: &[u8]) -> bool
pub fn supports(&self, domain: &[u8]) -> bool
Whether the domain belongs to this provider; any domain belongs to
Provider::GENERIC.
PHP: supports($domain).
Trait Implementations§
impl Copy for Provider
impl Eq for Provider
impl StructuralPartialEq for Provider
Auto Trait Implementations§
impl Forget for Provider
impl Freeze for Provider
impl Move for Provider
impl RefUnwindSafe for Provider
impl Send for Provider
impl Sync for Provider
impl Unpin for Provider
impl UnsafeUnpin for Provider
impl UnwindSafe for Provider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.