pub enum SocketAddress {
UnixDomain(Box<SocketAddr>),
V4(SocketAddrV4),
V6(SocketAddrV6),
}
Variants§
Implementations§
Source§impl SocketAddress
impl SocketAddress
Sourcepub fn host(&self) -> HostAddress
pub fn host(&self) -> HostAddress
Returns the “host” portion of the address
Sourcepub fn unix(&self) -> Option<UnixSocketAddr>
pub fn unix(&self) -> Option<UnixSocketAddr>
Returns the unix domain socket representation of the address
Sourcepub fn ip(&self) -> Option<SocketAddr>
pub fn ip(&self) -> Option<SocketAddr>
Returns the ip representation of the address
Trait Implementations§
Source§impl Clone for SocketAddress
impl Clone for SocketAddress
Source§fn clone(&self) -> SocketAddress
fn clone(&self) -> SocketAddress
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SocketAddress
impl Debug for SocketAddress
Source§impl<'de> Deserialize<'de> for SocketAddress
impl<'de> Deserialize<'de> for SocketAddress
Source§fn 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
Source§impl Display for SocketAddress
impl Display for SocketAddress
Source§impl From<SocketAddr> for SocketAddress
impl From<SocketAddr> for SocketAddress
Source§fn from(unix: UnixSocketAddr) -> SocketAddress
fn from(unix: UnixSocketAddr) -> SocketAddress
Converts to this type from the input type.
Source§impl From<SocketAddr> for SocketAddress
impl From<SocketAddr> for SocketAddress
Source§fn from(ip: SocketAddr) -> SocketAddress
fn from(ip: SocketAddr) -> SocketAddress
Converts to this type from the input type.
Source§impl From<SocketAddr> for SocketAddress
impl From<SocketAddr> for SocketAddress
Source§fn from(unix: SocketAddr) -> SocketAddress
fn from(unix: SocketAddr) -> SocketAddress
Converts to this type from the input type.
Source§impl From<SocketAddress> for String
impl From<SocketAddress> for String
Source§fn from(a: SocketAddress) -> String
fn from(a: SocketAddress) -> String
Converts to this type from the input type.
Source§impl FromStr for SocketAddress
impl FromStr for SocketAddress
Source§impl PartialEq for SocketAddress
impl PartialEq for SocketAddress
Source§impl Serialize for SocketAddress
impl Serialize for SocketAddress
Source§impl TryFrom<String> for SocketAddress
impl TryFrom<String> for SocketAddress
impl Eq for SocketAddress
Auto Trait Implementations§
impl Freeze for SocketAddress
impl RefUnwindSafe for SocketAddress
impl Send for SocketAddress
impl Sync for SocketAddress
impl Unpin for SocketAddress
impl UnwindSafe for SocketAddress
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