Searched refs:try_from (Results 1 – 4 of 4) sorted by relevance
44 let address_family = AddressFamily::try_from(address_family as u16)?; in do_socket()45 let socket_type = PosixSocketType::try_from((socket_type & 0xf) as u8)?; in do_socket()166 PosixSocketOption::try_from(optname as i32).map_err(|_| SystemError::ENOPROTOOPT)?; in do_getsockopt()199 PosixIpProtocol::try_from(level as u16).map_err(|_| SystemError::ENOPROTOOPT)?; in do_getsockopt()201 let optname = PosixTcpSocketOptions::try_from(optname as i32) in do_getsockopt()486 socket.shutdown(ShutdownType::try_from(how as i32)?)?; in do_shutdown()689 match AddressFamily::try_from(addr.family)? { in to_endpoint()720 let ret = match AddressFamily::try_from(unsafe { self.family })? { in len()900 fn try_from(value: u16) -> Result<Self, Self::Error> { in try_from() method1021 fn try_from(value: i32) -> Result<Self, Self::Error> { in try_from() method[all …]
43 fn try_from(value: i32) -> Result<Self, Self::Error> { in try_from() method
961 fn try_from(x: u16) -> Result<Self, Self::Error> { in try_from() method981 fn try_from(x: u8) -> Result<Self, Self::Error> { in try_from() method
1138 fn try_from(value: u8) -> Result<Self, Self::Error> { in try_from() method1313 let address_type = MemoryBarType::try_from(((bar_orig & 0x00000006) >> 1) as u8)?; in pci_bar_init()