Skip to main content

windows_wmi_com/
lib.rs

1//! # windows-wmi-com
2//!
3//! Pre-alpha (0.1.0-dev). In-process COM WMI client: `CoInitializeEx` (MTA) →
4//! `IWbemLocator::ConnectServer` → `IWbemServices::ExecQuery` →
5//! `IEnumWbemClassObject` drained one row at a time.
6//!
7//! See `README.md` for status and scope.
8
9mod error;
10mod row;
11mod value;
12mod wmi;
13
14pub use error::{Error, Result};
15pub use row::Row;
16pub use value::WmiValue;
17pub use wmi::Wmi;
18
19/// Rows are extracted from `IWbemClassObject` into a generic [`Row`] map and
20/// then handed to `T::from_wbem` for typed queries. Implement this for your
21/// own structs; there is no derive macro yet.
22pub trait FromWbem: Sized {
23    fn from_wbem(row: &Row) -> Result<Self>;
24}