Very basic NetworkManager bindings
This commit is contained in:
parent
cff3029833
commit
91a7fc6da1
7 changed files with 97 additions and 1 deletions
24
networkmanager/src/device.rs
Normal file
24
networkmanager/src/device.rs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
pub mod bluetooth;
|
||||
pub mod wired;
|
||||
pub mod wireless;
|
||||
|
||||
use crate::interface::device::DeviceProxy;
|
||||
use std::ops::Deref;
|
||||
|
||||
pub struct Device<'a>(DeviceProxy<'a>);
|
||||
|
||||
impl<'a> Deref for Device<'a> {
|
||||
type Target = DeviceProxy<'a>;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> From<DeviceProxy<'a>> for Device<'a> {
|
||||
fn from(device: DeviceProxy<'a>) -> Self {
|
||||
Device(device)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue