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]

[src]

Constructs a SockAddr from its raw components.

[src]

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

[src]

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

[src]

Returns this address's family.

[src]

Returns the size of this address in bytes.

[src]

Returns a raw pointer to the address.

Trait Implementations

impl Debug for SockAddr
[src]

[src]

Formats the value using the given formatter. Read more

impl From<SocketAddrV4> for SockAddr
[src]

[src]

Performs the conversion.

impl From<SocketAddrV6> for SockAddr
[src]

[src]

Performs the conversion.

impl From<SocketAddr> for SockAddr
[src]

[src]

Performs the conversion.

Auto Trait Implementations

impl Send for SockAddr

impl Sync for SockAddr