[][src]Struct posix_socket::SocketAddress

#[repr(C)]pub struct SocketAddress { /* fields omitted */ }

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]

impl Clone for SocketAddress[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.