Struct socket2::Domain [] [src]

pub struct Domain(_);

Specification of the communication domain for a socket.

This is a newtype wrapper around an integer which provides a nicer API in addition to an injection point for documentation. Convenience constructors such as Domain::ipv4, Domain::ipv6, etc, are provided to avoid reaching into libc for various constants.

This type is freely interconvertible with the i32 type, however, if a raw value needs to be provided.

Methods

impl Domain
[src]

[src]

Domain for IPv4 communication, corresponding to AF_INET.

[src]

Domain for IPv6 communication, corresponding to AF_INET6.

[src]

Domain for Unix socket communication, corresponding to AF_UNIX.

This function is only available on Unix when the unix feature is activated.

Trait Implementations

impl From<i32> for Domain
[src]

[src]

Performs the conversion.

impl From<Domain> for i32
[src]

[src]

Performs the conversion.

impl Copy for Domain
[src]

impl Clone for Domain
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Domain

impl Sync for Domain