mirror of
https://github.com/aramperes/nut-rs.git
synced 2025-09-09 13:38:30 -04:00
parent
fd1f72e1d0
commit
2360bd4a3f
3 changed files with 47 additions and 0 deletions
|
@ -35,6 +35,10 @@ async fn main() -> nut_client::Result<()> {
|
|||
for (name, description) in conn.list_ups().await? {
|
||||
println!("\t- Name: {}", name);
|
||||
println!("\t Description: {}", description);
|
||||
println!(
|
||||
"\t Number of logins: {}",
|
||||
conn.get_num_logins(&name).await?
|
||||
);
|
||||
|
||||
// Get list of mutable variables
|
||||
let mutable_vars = conn.list_mutable_vars(&name).await?;
|
||||
|
|
|
@ -34,6 +34,7 @@ fn main() -> nut_client::Result<()> {
|
|||
for (name, description) in conn.list_ups()? {
|
||||
println!("\t- Name: {}", name);
|
||||
println!("\t Description: {}", description);
|
||||
println!("\t Number of logins: {}", conn.get_num_logins(&name)?);
|
||||
|
||||
// Get list of mutable variables
|
||||
let mutable_vars = conn.list_mutable_vars(&name)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue