(&self)
| 129 | type Iter = std::vec::IntoIter<SocketAddr>; |
| 130 | |
| 131 | fn to_socket_addrs(&self) -> io::Result<Self::Iter> { |
| 132 | match &self.0 { |
| 133 | Host::Ip(ip) => { |
| 134 | let socket = SocketAddr::new(*ip, self.1 .0); |
| 135 | Ok(vec![socket].into_iter()) |
| 136 | } |
| 137 | Host::Hostname(hostname) => { |
| 138 | let addresses = (hostname.as_str(), self.1 .0).to_socket_addrs()?; |
| 139 | Ok(addresses.collect::<Vec<_>>().into_iter()) |
| 140 | } |
| 141 | } |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | #[derive(Deserialize, Clone)] |
nothing calls this directly
no outgoing calls
no test coverage detected