pub struct EventData<'nvml> {
    pub device: Device<'nvml>,
    pub event_type: EventTypes,
    pub event_data: Option<XidError>,
}
Expand description

Information about an event that has occurred.

Fields

device: Device<'nvml>

Device where the event occurred.

See Device.uuid() for a way to compare this Device to another Device and find out if they represent the same physical device.

event_type: EventTypes

Information about what specific event occurred.

event_data: Option<XidError>

Stores the last XID error for the device for the nvmlEventTypeXidCriticalError event.

None in the case of any other event type.

Implementations

Create a new EventData wrapper.

The event_type bitmask is created via the EventTypes::from_bits_truncate method, meaning that any bits that don’t correspond to flags present in this version of the wrapper will be dropped.

Safety

It is your responsibility to ensure that the given nvmlEventdata_t pointer is valid.

Trait Implementations

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.