@@ -77,6 +77,7 @@ pub enum SockType {
77
77
/// Constants used in [`socket`](fn.socket.html) and [`socketpair`](fn.socketpair.html)
78
78
/// to specify the protocol to use.
79
79
#[ repr( i32 ) ]
80
+ #[ derive( Clone , Copy , Debug , Eq , Hash , PartialEq ) ]
80
81
pub enum SockProtocol {
81
82
/// TCP protocol ([ip(7)](http://man7.org/linux/man-pages/man7/ip.7.html))
82
83
Tcp = libc:: IPPROTO_TCP ,
@@ -857,13 +858,14 @@ pub fn send(fd: RawFd, buf: &[u8], flags: MsgFlags) -> Result<usize> {
857
858
///
858
859
/// [Further reading](http://pubs.opengroup.org/onlinepubs/9699919799/functions/setsockopt.html)
859
860
#[ repr( i32 ) ]
861
+ #[ derive( Clone , Copy , Debug , Eq , Hash , PartialEq ) ]
860
862
pub enum SockLevel {
861
863
Socket = libc:: SOL_SOCKET ,
862
864
Tcp = libc:: IPPROTO_TCP ,
863
865
Ip = libc:: IPPROTO_IP ,
864
866
Ipv6 = libc:: IPPROTO_IPV6 ,
865
867
Udp = libc:: IPPROTO_UDP ,
866
- #[ cfg( any( target_os = "linux " , target_os = "android " ) ) ]
868
+ #[ cfg( any( target_os = "android " , target_os = "linux " ) ) ]
867
869
Netlink = libc:: SOL_NETLINK ,
868
870
}
869
871
@@ -970,7 +972,7 @@ pub unsafe fn sockaddr_storage_to_addr(
970
972
}
971
973
972
974
973
- #[ derive( Clone , Copy , PartialEq , Eq , Debug ) ]
975
+ #[ derive( Clone , Copy , Debug , Eq , Hash , PartialEq ) ]
974
976
pub enum Shutdown {
975
977
/// Further receptions will be disallowed.
976
978
Read ,
0 commit comments