pub enum Address {
Domainname {
host: String,
port: u16,
},
Ip(SocketAddr),
}
Expand description
Represents a network address, which could be either a domain name or an IP address.
Variants§
Domainname
An address represented by a domain name.
Ip(SocketAddr)
An address represented by an IP address.
Implementations§
Trait Implementations§
Source§impl TryFrom<&ProxyAddress> for Address
Tries to convert a ProxyAddress
into an Address
.
impl TryFrom<&ProxyAddress> for Address
Tries to convert a ProxyAddress
into an Address
.
Source§impl TryFrom<SocketAddr> for Address
Tries to convert a SocketAddr
into an Address
.
impl TryFrom<SocketAddr> for Address
Tries to convert a SocketAddr
into an Address
.
impl StructuralPartialEq for Address
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnwindSafe for Address
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