diff --git a/networkmanager/src/connection.rs b/networkmanager/src/connection.rs index 107b7b6..9fdf1bf 100644 --- a/networkmanager/src/connection.rs +++ b/networkmanager/src/connection.rs @@ -13,9 +13,9 @@ use crate::{ use std::ops::Deref; use zbus::Result; -pub struct Connection<'a>(ActiveConnectionProxy<'a>); +pub struct ActiveConnection<'a>(ActiveConnectionProxy<'a>); -impl<'a> Connection<'a> { +impl<'a> ActiveConnection<'a> { pub async fn devices(&self) -> Result>> { let devices = self.0.devices().await?; let mut out = Vec::with_capacity(devices.len()); @@ -57,7 +57,7 @@ impl<'a> Connection<'a> { } } -impl<'a> Deref for Connection<'a> { +impl<'a> Deref for ActiveConnection<'a> { type Target = ActiveConnectionProxy<'a>; fn deref(&self) -> &Self::Target { @@ -65,8 +65,8 @@ impl<'a> Deref for Connection<'a> { } } -impl<'a> From> for Connection<'a> { +impl<'a> From> for ActiveConnection<'a> { fn from(connection: ActiveConnectionProxy<'a>) -> Self { - Connection(connection) + ActiveConnection(connection) } } diff --git a/networkmanager/src/device.rs b/networkmanager/src/device.rs index cc50f5b..c804fe3 100644 --- a/networkmanager/src/device.rs +++ b/networkmanager/src/device.rs @@ -6,7 +6,7 @@ pub mod wireless; use crate::{ config::{ip4::Ipv4Config, ip6::Ipv6Config}, - connection::Connection, + connection::ActiveConnection, interface::{ config::{ip4::Ipv4ConfigProxy, ip6::Ipv6ConfigProxy}, connection::ActiveConnectionProxy, @@ -23,7 +23,7 @@ use zbus::Result; pub struct Device<'a>(DeviceProxy<'a>); impl<'a> Device<'a> { - pub async fn active_connection(&self) -> Result> { + pub async fn active_connection(&self) -> Result> { let active_connection = self.0.active_connection().await?; Ok(ActiveConnectionProxy::builder(self.0.connection()) .path(active_connection)? @@ -32,7 +32,7 @@ impl<'a> Device<'a> { .into()) } - pub async fn available_connections(&self) -> Result>> { + pub async fn available_connections(&self) -> Result>> { let available_connections = self.0.available_connections().await?; let mut out = Vec::with_capacity(available_connections.len()); for connection in available_connections {