Struct socket2::SockAddr[][src]

pub struct SockAddr { /* fields omitted */ }
[]

The address of a socket.

SockAddrs may be constructed directly to and from the standard library SocketAddr, SocketAddrV4, and SocketAddrV6 types.

Methods

impl SockAddr
[src]
[]

[]

Constructs a SockAddr from its raw components.

[]

Returns this address as a SocketAddrV4 if it is in the AF_INET family.

[]

Returns this address as a SocketAddrV4 if it is in the AF_INET6 family.

[]

Returns this address's family.

[]

Returns the size of this address in bytes.

[]

Returns a raw pointer to the address.

Trait Implementations

impl Debug for SockAddr
[src]
[+]

[]

Formats the value using the given formatter. Read more

impl From<SocketAddrV4> for SockAddr
[src]
[+]

[]

Performs the conversion.

impl From<SocketAddrV6> for SockAddr
[src]
[+]

[]

Performs the conversion.

impl From<SocketAddr> for SockAddr
[src]
[+]

[]

Performs the conversion.

Auto Trait Implementations

impl Send for SockAddr

impl Sync for SockAddr