Skip to main content

sysinfo/unix/linux/
mod.rs

1// Take a look at the license at the top of the repository in the LICENSE file.
2
3pub(crate) mod utils;
4
5cfg_select! {
6    feature = "system" => {
7        pub mod cgroup;
8        pub mod cpu;
9        pub mod motherboard;
10        pub mod process;
11        pub mod product;
12        pub mod system;
13
14        pub(crate) use self::cpu::CpuInner;
15        pub(crate) use self::motherboard::MotherboardInner;
16        pub(crate) use self::process::ProcessInner;
17        pub(crate) use self::product::ProductInner;
18        pub(crate) use self::system::SystemInner;
19        pub use self::system::{MINIMUM_CPU_UPDATE_INTERVAL, SUPPORTED_SIGNALS};
20    }
21    _ => {}
22}
23cfg_select! {
24    feature = "disk" => {
25        pub mod disk;
26
27        pub(crate) use self::disk::DiskInner;
28        pub(crate) use crate::unix::DisksInner;
29    }
30    _ => {}
31}
32cfg_select! {
33    feature = "component" => {
34        pub mod component;
35
36        pub(crate) use self::component::{ComponentInner, ComponentsInner};
37    }
38    _ => {}
39}
40cfg_select! {
41    feature = "network" => {
42        pub mod network;
43
44        pub(crate) use self::network::{NetworkDataInner, NetworksInner};
45    }
46    _ => {}
47}
48cfg_select! {
49    feature = "user" => {
50        pub(crate) use crate::unix::groups::get_groups;
51        pub(crate) use crate::unix::users::{get_users, UserInner};
52    }
53    _ => {}
54}
55
56#[doc = include_str!("../../../md_doc/is_supported.md")]
57pub const IS_SUPPORTED_SYSTEM: bool = true;
58
59// Make formattable by rustfmt.
60#[cfg(any())]
61mod cgroup;
62#[cfg(any())]
63mod component;
64#[cfg(any())]
65mod cpu;
66#[cfg(any())]
67mod disk;
68#[cfg(any())]
69mod motherboard;
70#[cfg(any())]
71mod network;
72#[cfg(any())]
73mod process;
74#[cfg(any())]
75mod product;
76#[cfg(any())]
77mod system;