[−][src]Struct iracing::telemetry::Sample
Sample represents a single sample of telemetry data from iRacing either from live telemetry, or from a telemetry file.
Implementations
impl Sample
[src]
pub fn has(&self, name: &'static str) -> bool
[src]
Check if a given variable is available in the telemetry sample
pub fn all(&self) -> Vec<ValueDescription>
[src]
Gets all values in the same along with names and descriptions.
Returns a vec of all values in the telemetry sample, along with additional metadata such as the name, description, unit and value count.
Note: This method is expensive and will return a large number of values.
It should be used primarily for debugging, and for most use cases
Selecting only the values required with get()
is suggested.
pub fn get(&self, name: &'static str) -> Result<Value, String>
[src]
Get a Value from the sample.
Read a single varialbe from the telemetry sample.
Returns Ok(Value)
if the telemetry value is available.
Returns Err(String)
if the value cannot be found.
Parameters
name
Name of the telemetry variable to get
- see the iRacing Telemtry documentation for a complete list of possible values
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Sample
[src]
impl Send for Sample
[src]
impl Sync for Sample
[src]
impl Unpin for Sample
[src]
impl UnwindSafe for Sample
[src]
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,
pub 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.
pub 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>,