Skip to content

Commit

Permalink
Fixes doc
Browse files Browse the repository at this point in the history
  • Loading branch information
teclator committed Jun 21, 2023
1 parent 940b758 commit 6cc4084
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions rust/agama-lib/src/network/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use super::proxies::IPv4Proxy;
use super::proxies::WirelessProxy;
use zbus::Connection;

// D-BUS client for the network service
/// D-BUS client for the network service
pub struct NetworkClient<'a> {
pub connection: Connection,
connections_proxy: ConnectionsProxy<'a>,
Expand All @@ -22,7 +22,7 @@ impl<'a> NetworkClient<'a> {
})
}

// Returns an array of network connections
/// Returns an array of network connections
pub async fn connections(&self) -> Result<Vec<NetworkConnection>, ServiceError> {
let connection_paths = self.connections_proxy.get_connections().await?;
let mut connections = vec![];
Expand All @@ -40,9 +40,9 @@ impl<'a> NetworkClient<'a> {
Ok(connections)
}

// It returns the NetworkConnection for the given connection path
//
// * `path`: the connections path to get the config from
/// Returns the NetworkConnection for the given connection path
///
/// * `path`: the connections path to get the config from
async fn connection_from(&self, path: &str) -> Result<NetworkConnection, ServiceError> {
let connection_proxy = ConnectionProxy::builder(&self.connection)
.path(path)?
Expand All @@ -55,7 +55,7 @@ impl<'a> NetworkClient<'a> {
.build()
.await?;

// TODO: consider using the `IPMethod` struct from `agama-network`.
/// TODO: consider using the `IPMethod` struct from `agama-network`.
let method = match ipv4_proxy.method().await? {
0 => "auto",
1 => "manual",
Expand Down Expand Up @@ -84,9 +84,9 @@ impl<'a> NetworkClient<'a> {
})
}

// Returns the [wireless settings][WirelessSettings] for the given connection
//
// * `path`: the connections path to get the wireless config from
/// Returns the [wireless settings][WirelessSettings] for the given connection
///
/// * `path`: the connections path to get the wireless config from
async fn wireless_from(&self, path: &str) -> Result<WirelessSettings, ServiceError> {
let wireless_proxy = WirelessProxy::builder(&self.connection)
.path(path)?
Expand Down

0 comments on commit 6cc4084

Please sign in to comment.