proc_mounts/lib.rs
1//! Provides easy access to data from the `/proc/swaps` and `/proc/mounts` files.
2//!
3//! ```rust,no_run
4//! extern crate proc_mounts;
5//!
6//! use proc_mounts::{MountIter, SwapIter};
7//! use std::io;
8//!
9//! fn main() -> io::Result<()> {
10//! println!("# Active Mounts");
11//! for mount in MountIter::new()? {
12//! println!("{:#?}", mount);
13//! }
14//!
15//! println!("# Active Swaps");
16//! for swap in SwapIter::new()? {
17//! println!("{:#?}", swap);
18//! }
19//!
20//! Ok(())
21//! }
22//! ```
23
24mod mounts;
25mod swaps;
26
27pub use self::{mounts::*, swaps::*};