Struct network_manager::Device[][src]

pub struct Device { /* fields omitted */ }

Methods

impl Device
[src]

Connects a Network Manager device.

Examples

use network_manager::{NetworkManager, DeviceType};
let manager = NetworkManager::new();
let devices = manager.get_devices().unwrap();
let i = devices.iter().position(|ref d| *d.device_type() == DeviceType::WiFi).unwrap();
devices[i].connect().unwrap();

Disconnect a Network Manager device.

Examples

use network_manager::{NetworkManager, DeviceType};
let manager = NetworkManager::new();
let devices = manager.get_devices().unwrap();
let i = devices.iter().position(|ref d| *d.device_type() == DeviceType::WiFi).unwrap();
devices[i].disconnect().unwrap();

Trait Implementations

impl Clone for Device
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Device
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl !Send for Device

impl !Sync for Device