Skip to content

Commit 76af8a9

Browse files
committed
testing example: Show connection name and secrets
1 parent f0356ab commit 76af8a9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

examples/testing.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ fn main() -> Result<(), Error> {
2121
println!("Connection id: {}", con.id()?);
2222
}
2323
Device::WiFi(x) => {
24+
println!("Applied connection: {:#?}", x.active_connection()?.id()?);
25+
println!(
26+
"Secrets: {:#?}",
27+
x.active_connection()?
28+
.get_secrets("802-11-wireless-security")?
29+
);
2430
println!("Bitrate: {:?}", x.bitrate()?);
2531
x.request_scan(std::collections::HashMap::new())?;
2632
for ap in x.get_all_access_points()? {

0 commit comments

Comments
 (0)