pub struct EtwProvider {}
Expand description

Implements Provider by registering with ETW.

Implementations§

source§

impl EtwProvider

source

pub fn new(provider_id: &GUID) -> Result<EtwProvider, Error>

Registers an event provider with ETW.

The implementation uses [EventWriteEx](https://docs.microsoft.com/en-us/windows/win32/api/evntprov/nf-evntprov-eventwriteex).

source

pub fn register_provider_metadata( &mut self, provider_metadata: &[u8] ) -> Result<(), Error>

See TraceLoggingRegisterEx in traceloggingprovider.h. This registers provider metadata.

source

pub fn set_provider_traits( &mut self, provider_traits: &[u8] ) -> Result<(), Error>

Registers provider traits for a provider.

ETW providers should not call this function directly. It is automatically called by the provider code that is generated by win_etw_macros.

See Provider Traits.

Trait Implementations§

source§

impl Drop for EtwProvider

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl Provider for EtwProvider

source§

fn write( &self, options: Option<&EventOptions>, descriptor: &EventDescriptor, data: &[EventDataDescriptor<'_>] )

Writes one event.
source§

fn is_enabled(&self, level: u8, keyword: u64) -> bool

Checks whether the event provider is enabled.
source§

fn is_event_enabled(&self, event_descriptor: &EventDescriptor) -> bool

Checks whether a specific event is enabled.
source§

impl Send for EtwProvider

source§

impl Sync for EtwProvider

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>,

§

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>,

§

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.