mirror of
https://github.com/aramperes/nut-rs.git
synced 2025-09-09 13:38:30 -04:00
parent
f3814c831d
commit
b6e3a96aa1
3 changed files with 48 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue