pub enum Domain {
DomainName(DomainString),
V4(Ipv4Addr),
V6(Ipv6Addr),
Tagged(String),
}Expand description
Domain part of a mailbox in a MAIL FROM address.
Variants§
DomainName(DomainString)
A valid DNS domain name
V4(Ipv4Addr)
An IPv4 address literal, e.g. from [10.0.0.1]
V6(Ipv6Addr)
An IPv6 address literal, e.g. from [IPv6:::1]
Tagged(String)
A general/tagged address literal, e.g. from [future:something].
Stores the original "tag:literal" string; split on the first :
when the tag or literal parts are needed individually.
Implementations§
Source§impl Domain
impl Domain
Sourcepub fn is_ascii(&self) -> bool
pub fn is_ascii(&self) -> bool
Returns true if the wire representation of this domain is pure ASCII.
DomainName is always normalized to ASCII punycode on the wire, so it
is always considered ASCII here. IP address literals are inherently
ASCII. Tagged literals are checked character-by-character.
Trait Implementations§
impl Eq for Domain
impl StructuralPartialEq for Domain
Auto Trait Implementations§
impl Freeze for Domain
impl RefUnwindSafe for Domain
impl Send for Domain
impl Sync for Domain
impl Unpin for Domain
impl UnwindSafe for Domain
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more