win_wrap::pdh

Struct PdhQuery

Source
pub struct PdhQuery(/* private fields */);

Implementations§

Source§

impl PdhQuery

Source

pub fn new() -> Self

创建一个性能数据查询器。

Source

pub fn add_counter(&self, full_counter_path: String) -> PdhCounter

将指定的计数器添加到查询。 full_counter_path 包含计数器路径的字符串。 有关计数器路径格式的详细信息,请参阅指定计数器路径。

Source

pub fn add_english_counter(&self, full_counter_path: String) -> PdhCounter

将指定的非特定语言计数器添加到查询。 full_counter_path 包含计数器路径的字符串。 有关计数器路径格式的详细信息,请参阅指定计数器路径。

Source

pub fn collect_data(&self) -> &Self

收集指定查询中所有计数器的当前原始数据值,并更新每个计数器的状态代码。

Trait Implementations§

Source§

impl Debug for PdhQuery

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for PdhQuery

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for PdhQuery

Source§

impl Sync for PdhQuery

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.