pub struct FieldValueSample {
    pub field: FieldId,
    pub timestamp: i64,
    pub latency: i64,
    pub value: Result<SampleValue, NvmlError>,
}
Expand description

Struct that stores information returned from Device.field_values_for().

Fields§

§field: FieldId

The field that this sample is for.

§timestamp: i64

This sample’s CPU timestamp in μs (Unix time).

§latency: i64

How long this field value took to update within NVML, in μs.

This value may be averaged across several fields serviced by the same driver call.

§value: Result<SampleValue, NvmlError>

The value of this sample.

Will be an error if retrieving this specific value failed.

Trait Implementations§

source§

impl Debug for FieldValueSample

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl TryFrom<nvmlFieldValue_st> for FieldValueSample

source§

fn try_from(value: nvmlFieldValue_t) -> Result<Self, Self::Error>

Construct FieldValueSample from the corresponding C struct.

§Errors
  • UnexpectedVariant, for which you can read the docs for
§

type Error = NvmlError

The type returned in the event of a conversion error.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.