pub struct Provider { /* private fields */ }
Expand description
Describes an ETW Provider to use, along with its options
Implementations§
source§impl Provider
impl Provider
sourcepub fn by_guid<G: Into<GUID>>(guid: G) -> ProviderBuilder
pub fn by_guid<G: Into<GUID>>(guid: G) -> ProviderBuilder
Create a Provider defined by its GUID
Many types implement Into<GUID>
and are acceptable as argument: GUID
themselves, but also &str
, etc.
sourcepub fn kernel(kernel_provider: &KernelProvider) -> ProviderBuilder
pub fn kernel(kernel_provider: &KernelProvider) -> ProviderBuilder
Create a Kernel Provider
You can pass either a KernelProvider you have created yourself, or one of the standard providers from crate::provider::kernel_providers
.
sourcepub fn by_name(name: &str) -> Result<ProviderBuilder, PlaError>
pub fn by_name(name: &str) -> Result<ProviderBuilder, PlaError>
Create a Provider defined by its name.
This function will look for the Provider GUID by means of the ITraceDataProviderCollection interface.
Remark
This function is considerably slow, prefer using the by_guid
function when possible
Example
let my_provider = Provider::by_name("Microsoft-Windows-WinINet").unwrap().build();