[][src]Struct ferrisetw::schema::SchemaLocator

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

Represents a cache of Schemas already located

This cache is implemented as a HashMap where the key is a combination of the following elements of an Event Record

Credits: KrabsETW::schema_locator

Implementations

impl SchemaLocator[src][]

pub fn event_schema(
    &mut self,
    event: EventRecord
) -> Result<Schema, SchemaError>
[src][]

Use the event_schema function to retrieve the Schema of an ETW Event

Arguments

  • event - The EventRecord that's passed to the callback

Remark

This is the first function that should be called within a Provider callback, if everything works as expected this function will return a Result with the Schema that represents the ETW event that triggered the callback

This function can fail, if it does it will return a SchemaError

Example

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

Trait Implementations

impl Debug for SchemaLocator[src][+]

impl Default for SchemaLocator[src][+]

Auto Trait Implementations

impl RefUnwindSafe for SchemaLocator

impl Send for SchemaLocator

impl Sync for SchemaLocator

impl Unpin for SchemaLocator

impl UnwindSafe for SchemaLocator

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>, 
[+]