Quick check whether a string looks like an IPv4 address.
(s: &str)
| 391 | |
| 392 | /// Quick check whether a string looks like an IPv4 address. |
| 393 | fn is_ipv4(s: &str) -> bool { |
| 394 | s.split('.').count() == 4 && s.split('.').all(|p| p.parse::<u8>().is_ok()) |
| 395 | } |
| 396 | |
| 397 | #[tauri::command] |
| 398 | pub async fn remote_connect_get_device_info() -> Result<DeviceInfo, String> { |
no test coverage detected