[][src]Struct ferrisetw::schema::Schema

pub struct Schema { /* fields omitted */ }
[]

Represents a Schema

This structure holds a TraceEventInfo which let us obtain information from the ETW event

Implementations

impl Schema[src][]

pub fn event_id(&self) -> u16[src][]

Use the event_id function to obtain the EventId of the Event Record

This getter returns the EventId of the ETW Event that triggered the registered callback

Example

let my_callback = |record: EventRecord, schema_locator: &mut SchemaLocator| {
    let schema = schema_locator.event_schema(record)?;
    let event_id = schema.event_id();
};

pub fn opcode(&self) -> u8[src][]

Use the opcode function to obtain the Opcode of the Event Record

This getter returns the opcode of the ETW Event that triggered the registered callback

Example

let my_callback = |record: EventRecord, schema_locator: &mut SchemaLocator| {
    let schema = schema_locator.event_schema(record)?;
    let event_id = schema.opcode();
};

pub fn event_flags(&self) -> u16[src][]

Use the event_flags function to obtain the Event Flags of the EventRecord

This getter returns the Event Flags of the ETW Event that triggered the registered callback

Example

let my_callback = |record: EventRecord, schema_locator: &mut SchemaLocator| {
    let schema = schema_locator.event_schema(record)?;
    let event_flags = schema.event_flags();
};

pub fn event_version(&self) -> u8[src][]

Use the event_version function to obtain the Version of the EventRecord

This getter returns the Version of the ETW Event that triggered the registered callback

Example

let my_callback = |record: EventRecord, schema_locator: &mut SchemaLocator| {
    let schema = schema_locator.event_schema(record)?;
    let event_version = schema.event_version();
};

pub fn process_id(&self) -> u32[src][]

Use the process_id function to obtain the ProcessId of the EventRecord

This getter returns the ProcessId of the process that triggered the ETW Event

Example

let my_callback = |record: EventRecord, schema_locator: &mut SchemaLocator| {
    let schema = schema_locator.event_schema(record)?;
    let pid = schema.process_id();
};

pub fn thread_id(&self) -> u32[src][]

Use the thread_id function to obtain the ThreadId of the EventRecord

This getter returns the ThreadId of the thread that triggered the ETW Event

Example

let my_callback = |record: EventRecord, schema_locator: &mut SchemaLocator| {
    let schema = schema_locator.event_schema(record)?;
    let tid = schema.thread_id();
};

pub fn timestamp(&self) -> i64[src][]

Use the timestamp function to obtain the TimeStamp of the EventRecord

This getter returns the TimeStamp of the ETW Event

Example

let my_callback = |record: EventRecord, schema_locator: &mut SchemaLocator| {
    let schema = schema_locator.event_schema(record)?;
    let timestamp = schema.timestamp();
};

pub fn activity_id(&self) -> Guid[src][]

Use the activity_id function to obtain the ActivityId of the EventRecord

This getter returns the ActivityId from the ETW Event, this value is used to related Two events

Example

let my_callback = |record: EventRecord, schema_locator: &mut SchemaLocator| {
    let schema = schema_locator.event_schema(record)?;
    let activity_id = schema.activity_id();
};

pub fn decoding_source(&self) -> DecodingSource[src][]

Use the decoding_source function to obtain the DecodingSource from the TraceEventInfo

This getter returns the DecodingSource from the event, this value identifies the source used parse the event data

Example

let my_callback = |record: EventRecord, schema_locator: &mut SchemaLocator| {
    let schema = schema_locator.event_schema(record)?;
    let decoding_source = schema.decoding_source();
};

pub fn provider_name(&self) -> String[src][]

Use the provider_name function to obtain the Provider name from the TraceEventInfo

Example

let my_callback = |record: EventRecord, schema_locator: &mut SchemaLocator| {
    let schema = schema_locator.event_schema(record)?;
    let provider_name = schema.provider_name();
};

pub fn task_name(&self) -> String[src][]

Use the task_name function to obtain the Task name from the TraceEventInfo

See: TaskType

Example

let my_callback = |record: EventRecord, schema_locator: &mut SchemaLocator| {
    let schema = schema_locator.event_schema(record)?;
    let task_name = schema.task_name();
};

pub fn opcode_name(&self) -> String[src][]

Use the opcode_name function to obtain the Opcode name from the TraceEventInfo

See: OpcodeType

Example

let my_callback = |record: EventRecord, schema_locator: &mut SchemaLocator| {
    let schema = schema_locator.event_schema(record)?;
    let opcode_name = schema.opcode_name();
};

Trait Implementations

impl Eq for Schema[src]

impl PartialEq<Schema> for Schema[src][+]

Auto Trait Implementations

impl RefUnwindSafe for Schema

impl !Send for Schema

impl !Sync for Schema

impl Unpin for Schema

impl UnwindSafe for Schema

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src][+]

impl<T> Borrow<T> for T where
    T: ?Sized
[src][+]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src][+]

impl<T> From<T> for T[src][+]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src][+]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src][+]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src][+]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[+]