Skip to main content

os_identifier/
lib.rs

1// todo:
2// add more examples with arbitrary strings
3// showing what we know about the OS not only the string.
4// Update introducing sentence to match README.md
5
6
7//! # OS Identifier
8//!
9//! OS Identifier resolves product / release names of operating systems used by
10//! endoflife.date into canonical names.
11//!
12//! ```
13//! use os_identifier::OS;
14//!
15//! fn main() {
16//!     let os = OS::parse("windows-11-24h2-w").unwrap();
17//!
18//!     assert_eq!(os.vendor(), String::from("Microsoft"));
19//!     assert_eq!(os.product(), String::from("Windows 11"));
20//!
21//!     assert!(os.to_string().contains(&String::from("Microsoft Windows 11 Pro 24H2")));
22//! }
23//! ```
24mod model;
25pub use model::OS;
26pub use model::Windows;
27
28mod parser;
29
30mod util;