is_laptop/lib.rs
1#[cfg(target_os = "linux")]
2mod linux;
3#[cfg(target_os = "windows")]
4mod windows;
5
6/// Check if the local device is a Laptop or not.
7///
8/// True if the device is a Laptop or similar (like Notebook).
9pub fn check() -> bool {
10 #[cfg(target_os = "windows")]
11 return windows::check();
12
13 #[cfg(target_os = "linux")]
14 return linux::check();
15}