Enum smtp_message::Hostname
source · [−]pub enum Hostname<S = String> {
Utf8Domain {
raw: S,
punycode: String,
},
AsciiDomain {
raw: S,
},
Ipv6 {
raw: S,
ip: Ipv6Addr,
},
Ipv4 {
raw: S,
ip: Ipv4Addr,
},
}
Expand description
Note: comparison happens only on the raw
field, meaning that if you modify
or create a Hostname
yourself it could have surprising results. But such a
Hostname
would then not actually represent a real hostname, so you
probably would have had surprising results anyway.
Variants
Utf8Domain
AsciiDomain
Ipv6
Ipv4
Implementations
Trait Implementations
sourceimpl<'de, S> Deserialize<'de> for Hostname<S> where
S: Deserialize<'de>,
impl<'de, S> Deserialize<'de> for Hostname<S> where
S: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<S: Eq> Eq for Hostname<S>
impl<S> StructuralEq for Hostname<S>
Auto Trait Implementations
impl<S> RefUnwindSafe for Hostname<S> where
S: RefUnwindSafe,
impl<S> Send for Hostname<S> where
S: Send,
impl<S> Sync for Hostname<S> where
S: Sync,
impl<S> Unpin for Hostname<S> where
S: Unpin,
impl<S> UnwindSafe for Hostname<S> where
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more