Mountain/IPC/WindAirCommands/GetOrCreateAirClient.rs
1
2//! Connect-on-each-call helper. TODO: replace with a state-
3//! managed singleton once Air-side connection pooling lands.
4
5use crate::Air::AirClient as AirClientModule;
6
7pub(super) async fn Fn(address:String) -> Result<AirClientModule::AirClient, String> {
8 AirClientModule::AirClient::new(&address)
9 .await
10 .map_err(|e| format!("Failed to create Air client: {:?}", e))
11}