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§
Implementations§
Trait Implementations§
impl<S: Eq> Eq for Hostname<S>
Auto Trait Implementations§
impl<S> Freeze for Hostname<S>where
S: Freeze,
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§
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