#[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 variant 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 Freeze for FilterValue
impl RefUnwindSafe for FilterValue
impl Send for FilterValue
impl Sync for FilterValue
impl Unpin for FilterValue
impl UnsafeUnpin 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