Implement GET CMDDESC

Fixes #16
This commit is contained in:
Aram 🍐 2021-08-01 00:28:31 -04:00
parent f3814c831d
commit b6e3a96aa1
3 changed files with 48 additions and 2 deletions

View file

@ -45,7 +45,8 @@ async fn main() -> nut_client::Result<()> {
// List UPS commands
println!("\t Commands:");
for cmd in conn.list_commands(&name).await? {
println!("\t\t- {}", cmd);
let description = conn.get_command_description(&name, &cmd).await?;
println!("\t\t- {} ({})", cmd, description);
}
}

View file

@ -44,7 +44,8 @@ fn main() -> nut_client::Result<()> {
// List UPS commands
println!("\t Commands:");
for cmd in conn.list_commands(&name)? {
println!("\t\t- {}", cmd);
let description = conn.get_command_description(&name, &cmd)?;
println!("\t\t- {} ({})", cmd, description);
}
}