1
2
3
4
5
6
7
8
9
10
11
use crate::{model::interface::NetworkInterface, network};

#[tauri::command]
pub fn get_interfaces() -> Result<Vec<NetworkInterface>, String> {
    network::utils::get_interfaces().map_err(|e| e.to_string())
}

#[tauri::command]
pub fn get_non_empty_interfaces() -> Result<Vec<NetworkInterface>, String> {
    network::utils::get_non_empty_interfaces().map_err(|e| e.to_string())
}