pub async fn get_auto_switch_rules() -> Result<Vec<AutoSwitchRule>, IpcError>Expand description
Get all auto-switch rules
§Returns
Ok(Vec<AutoSwitchRule>)- All configured auto-switch rulesErr(IpcError)- Communication error
§Example
use aethermap_common::ipc_client;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let rules = ipc_client::get_auto_switch_rules().await?;
for rule in rules {
println!("App '{}' -> Profile '{}'", rule.app_id, rule.profile_name);
}
Ok(())
}