Function wmi::query::build_query [−][src]
pub fn build_query<'de, T>(
filters: Option<&HashMap<String, FilterValue>>
) -> Result<String, WMIError> where
T: Deserialize<'de>,
Expand description
Build an SQL query for the given filters, over the given type (using it’s name and fields). For example, for:
Examples
For a struct such as:
ⓘ
#[derive(Deserialize, Debug)]
#[serde(rename = "Win32_OperatingSystem")]
#[serde(rename_all = "PascalCase")]
struct OperatingSystem {
caption: String,
debug: bool,
}
The resulting query (with no filters) will look like:
"SELECT Caption, Debug FROM Win32_OperatingSystem";