From 8c5fa422280ba51fca67086dbfdb5dd6a836f98c Mon Sep 17 00:00:00 2001 From: HimbeerserverDE Date: Tue, 14 Nov 2023 19:41:11 +0100 Subject: add module level documentation --- src/addr.rs | 2 ++ src/blocking.rs | 8 ++++++++ src/link.rs | 2 ++ src/route.rs | 2 ++ src/tunnel.rs | 2 ++ 5 files changed, 16 insertions(+) (limited to 'src') diff --git a/src/addr.rs b/src/addr.rs index 2c949f7..72b63c4 100644 --- a/src/addr.rs +++ b/src/addr.rs @@ -1,3 +1,5 @@ +//! Simple functions to add and delete IP addresses. + use crate::{Error, Result}; use std::net::IpAddr; diff --git a/src/blocking.rs b/src/blocking.rs index 3429153..4c73837 100644 --- a/src/blocking.rs +++ b/src/blocking.rs @@ -1,3 +1,11 @@ +//! Blocking wrappers around the asynchronous API. +//! +//! All functions except for members of the tunnel module internally use their +//! async counterparts inside a temporary tokio runtime. +//! Tunnels are already synchronous. +//! +//! Consult the async modules for documentation. + #[cfg(feature = "tunnel")] pub use crate::tunnel; diff --git a/src/link.rs b/src/link.rs index 058eb37..a5b33fc 100644 --- a/src/link.rs +++ b/src/link.rs @@ -1,3 +1,5 @@ +//! Simple functions to add, monitor and configure network interfaces. + use crate::{Error, Result}; use std::time::Duration; diff --git a/src/route.rs b/src/route.rs index 398cd3e..00bbef8 100644 --- a/src/route.rs +++ b/src/route.rs @@ -1,3 +1,5 @@ +//! Simple functions to add and delete routes. + use crate::{Error, Result}; use std::net::{Ipv4Addr, Ipv6Addr}; diff --git a/src/tunnel.rs b/src/tunnel.rs index df172c0..a8acdd8 100644 --- a/src/tunnel.rs +++ b/src/tunnel.rs @@ -1,3 +1,5 @@ +//! Owned 6in4 and 4in6 tunnels with automatic deletion on drop. + use crate::{Error, Result}; use std::ffi::{c_char, c_int, CString}; -- cgit v1.2.3