use serde::Deserialize; use mikrotik_lite::MikrotikLite; #[tokio::main] async fn main() { let mut api1 = MikrotikLite::new( "api_login".to_string(), "api_pass".to_string(), "10.80.80.1:8728".to_string(), ).unwrap(); let mut api2 = MikrotikLite::new( "api_login".to_string(), "api_pass".to_string(), "10.80.80.1:8728".to_string(), ).unwrap(); let route_future = api1.send_command_json_async( "/ip/route/print".to_string(), None ); let identity_future = api2.send_command_async::( "/system/identity/print".to_string(), None ); let (route, identity) = tokio::join!(route_future, identity_future); println!("{}", route.unwrap()); println!("{:#?}", identity.unwrap()); } #[allow(dead_code)] #[derive(Debug, Deserialize)] struct Identity { pub name: String }