pub enum Host {
Ipv4(Ipv4Addr),
Ipv6(Ipv6Addr),
Domain(String),
}
Expand description
Represents a host address. Does not include the port, and may be either an ip address or a domain name
Variants§
Ipv4(Ipv4Addr)
An IPv4 address
Ipv6(Ipv6Addr)
An Ipv6 address
Domain(String)
A domain name, such as example.com
in tcp://example.com:4567
.
Trait Implementations§
source§impl PartialEq for Host
impl PartialEq for Host
impl Eq for Host
impl StructuralEq for Host
impl StructuralPartialEq for Host
Auto Trait Implementations§
impl RefUnwindSafe for Host
impl Send for Host
impl Sync for Host
impl Unpin for Host
impl UnwindSafe for Host
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
§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