1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
pub use crate::;
/// Returns information about the current operating system (id, name, version, variant, edition, codename).
///
/// - codename on Windows will be display version string e.g 22H2, 23H1 etc and on Linux it will be the codename of the distribution.
///
/// - variant will be server / client
///
/// # Examples
///
/// ```
/// use osinfo;
///
/// let info = osinfo::get();
///
/// // Print full information:
/// println!("OS information: {info}");
///
/// // Print information separately:
/// println!("ID: {}", info.get_id());
/// println!("Name: {}", info.get_name());
/// println!("Version: {}", info.get_version());
/// println!("Variant: {}", info.get_variant());
/// println!("Edition: {}", info.get_edition());
/// println!("Codename: {}", info.get_codename());
/// ```