[−][src]Struct ferrisetw::schema::SchemaLocator
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
- EventHeader.ProviderId
- EventHeader.EventDescriptor.Id
- EventHeader.EventDescriptor.Opcode
- EventHeader.EventDescriptor.Version
- EventHeader.EventDescriptor.Level
Credits: KrabsETW::schema_locator
Implementations
impl SchemaLocator[src]
pub fn event_schema(
&mut self,
event: EventRecord
) -> Result<Schema, SchemaError>[src]
&mut self,
event: EventRecord
) -> Result<Schema, SchemaError>
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]
fn default() -> 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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,