[−][src]Struct posix_socket::SocketAddress
Generic socket address.
This struct is large enough to hold any socket address.
Implementations
impl SocketAddress[src]
pub fn family(&self) -> c_int[src]
pub fn as_inet4(&self) -> Option<SocketAddressInet4>[src]
Get the address as an IPv4 socket address.
Returns None if the address is not an IPv4 socket address.
pub fn as_inet6(&self) -> Option<SocketAddressInet6>[src]
Get the address as an IPv6 socket address.
Returns None if the address is not an IPv6 socket address.
pub fn as_unix(&self) -> Option<SocketAddressUnix>[src]
Get the address as an unix socket address.
Returns None if the address is not a unix socket address.
Trait Implementations
impl AsSocketAddress for SocketAddress[src]
fn as_sockaddr(&self) -> *const sockaddr[src]
fn as_sockaddr_mut(&mut self) -> *mut sockaddr[src]
fn len(&self) -> socklen_t[src]
fn set_len(&mut self, len: socklen_t)[src]
fn max_len(&self) -> socklen_t[src]
impl Clone for SocketAddress[src]
fn clone(&self) -> SocketAddress[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for SocketAddress
impl Send for SocketAddress
impl Sync for SocketAddress
impl Unpin for SocketAddress
impl UnwindSafe for SocketAddress
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,