Struct socket2::Domain [−][src]
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 C’s int
type, however, if a raw
value needs to be provided.
Implementations
impl Domain
[src][−]
Unix only API.
pub fn unix() -> Domain
[src][−]
Domain for Unix socket communication, corresponding to AF_UNIX
.
pub fn packet() -> Domain
[src][−]
Domain for low-level packet interface, corresponding to AF_PACKET
.
Notes
This function is only available on Linux.
impl Domain
[src][−]
pub fn ipv4() -> Domain
[src][−]
Domain for IPv4 communication, corresponding to AF_INET
.
pub fn ipv6() -> Domain
[src][−]
Domain for IPv6 communication, corresponding to AF_INET6
.
Trait Implementations
impl Clone for Domain
[src][+]
impl Copy for Domain
[src]
impl Debug for Domain
[src][+]
impl From<Domain> for c_int
[src][+]
impl From<i32> for Domain
[src][+]
Auto Trait Implementations
impl RefUnwindSafe for Domain
impl Send for Domain
impl Sync for Domain
impl Unpin for Domain
impl UnwindSafe for Domain
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,
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,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,