Enum wmi::query::FilterValue
source · #[non_exhaustive]pub enum FilterValue {
Bool(bool),
Number(i64),
Str(&'static str),
String(String),
StrLike(&'static str),
StringLike(String),
IsA(&'static str),
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Bool(bool)
Number(i64)
Str(&'static str)
String(String)
StrLike(&'static str)
StringLike(String)
IsA(&'static str)
Implementations§
source§impl FilterValue
impl FilterValue
sourcepub fn is_a<'de, T>() -> WMIResult<Self>where
T: Deserialize<'de>,
pub fn is_a<'de, T>() -> WMIResult<Self>where
T: Deserialize<'de>,
Create a FilterValue::IsA varinat form a given type
ⓘ
#[derive(Deserialize)]
struct Win32_OperatingSystem {}
let mut filters = HashMap::<String, FilterValue>::new();
filters.insert("TargetInstance".to_owned(), FilterValue::is_a::<Win32_OperatingSystem>()?);
Trait Implementations§
source§impl From<&'static str> for FilterValue
impl From<&'static str> for FilterValue
source§impl From<String> for FilterValue
impl From<String> for FilterValue
source§impl From<bool> for FilterValue
impl From<bool> for FilterValue
Auto Trait Implementations§
impl RefUnwindSafe for FilterValue
impl Send for FilterValue
impl Sync for FilterValue
impl Unpin for FilterValue
impl UnwindSafe for FilterValue
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more