Struct nvml_wrapper::event::EventSet [] [src]

pub struct EventSet<'nvml> { /* fields omitted */ }

Handle to a set of events.

Operations on a set are not thread-safe. It does not, therefore, implement Sync.

Once again, Rust's lifetimes will ensure that this EventSet does not outlive the NVML instance that it was created from.

Methods

impl<'nvml> EventSet<'nvml>
[src]

Use this to release the set's events if you care about handling potential errors (the Drop implementation ignores errors!).

Errors

  • Uninitialized, if the library has not been successfully initialized
  • Unknown, on any unexpected error

Waits on events for the given timeout (in ms) and delivers one when it arrives.

This method returns immediately if an event is ready to be delivered when it is called. If no events are ready it will sleep until an event arrives, but not longer than the specified timeout. In certain conditions, this method could return before the timeout passes (e.g. when an interrupt arrives).

In the case of an XID error, the function returns the most recent XID error type seen by the system. If there are multiple XID errors generated before this method is called, the last seen XID error type will be returned for all XID error events.

Errors

  • Uninitialized, if the library has not been successfully initialized
  • Timeout, if no event arrived in the specified timeout or an interrupt arrived
  • GpuLost, if a GPU has fallen off the bus or is otherwise inaccessible
  • Unknown, on any unexpected error

Device Support

Supports Fermi and newer fully supported devices.

Consume the struct and obtain the raw set handle that it contains.

Obtain a reference to the raw set handle contained in the struct.

Obtain a mutable reference to the raw set handle contained in the struct.

Sometimes necessary for C interop. Use carefully.

Trait Implementations

impl<'nvml> Debug for EventSet<'nvml>
[src]

Formats the value using the given formatter.

impl<'nvml> Send for EventSet<'nvml>
[src]

impl<'nvml> From<nvmlEventSet_t> for EventSet<'nvml>
[src]

Performs the conversion.

impl<'nvml> Drop for EventSet<'nvml>
[src]

This Drop implementation ignores errors! Use the .release_events() method on the EventSet struct if you care about handling them.

A method called when the value goes out of scope. Read more