Struct xdrk::Run

source · []
pub struct Run { /* private fields */ }
Expand description

Holds access information for the file and provides access to it.

Implementations

Library compilation date.

Library compilation time.

Library compilation date and time.

This is a convenience function wrapping the functions library_date and library_time to produce a datetime object.

Loads a drk/xrk file and creates an Run object.

On success, the Result contains a datetime object which defines when this Run was recorded.

For lap with index lap_idx, request LapInfo. Returns an error if lap_idx is out of range (i.e. the Run does not contain a lap with that index) or the library calls fails for any reason.

LapInfo objects contain the lap number, the start of the lap within the run recorded in this file (via the start() getter) and the lap duration (via the duration() getter).

For lap with index idx, request all channels. Returns a Lap object or an error if idx is out of range (i.e. the Run does not contain a lap with that index) or the library call fails for any reason.

Lap objects contain a LapInfo object and a Vec<Channel> containing all data recorded in the lap.

Request all channels for all laps contained in this Run. Fails if the library call fails for any reason, either on finding all laps or on requesting Laps.

For channel with index idx, request the channel name.

Request index of channel with name channel_name.

For channel with index channel_idx, request the channel unit.

Request a Channel object by name and lap index. Fails if no channel with that name exists, if no lap with that index exists or the library call fails for any reason. Pass None for lap to get the raw channel with data from all laps.

For channel with id channel_id, collect the measurement samples in a ChannelData object. GPS data included.

For channel with index channel_idx, request the number of samples contained in this Run.

For channel with index channel_idx, request the samples contained in this Run.

The data will be returned in the form of a ChannelData object, which contains the data as a set of timestamps (the timestamps() getter returns a &Vec<f64>) and a corresponding set of samples (the samples() getter returns another &Vec<f64>).

For lap with index lap_idx and channel with index channel_idx, request the number of samples contained in this Run.

For lap with index lap_idx and channel with index channel_idx, request the samples contained in this Run.

The data will be returned in the form of a ChannelData object, which contains the data as a set of timestamps (the timestamps() getter returns a &Vec<f64>) and a corresponding set of samples (the samples() getter returns another &Vec<f64>).

For GPS channel with index channel_idx, request the channel name.

For GPS channel with index channel_idx, request the GPS channel unit.

For GPS channel with index channel_idx, request the number of samples contained in this Run.

For GPS channel with index channel_idx, request the samples contained in this Run.

The data will be returned in the form of a ChannelData object, which contains the data as a set of timestamps (the timestamps() getter returns a &Vec<f64>) and a corresponding set of samples (the samples() getter returns another &Vec<f64>).

For lap with index lap_idx and GPS channel with index channel_idx, request the number of samples contained in this Run.

For lap with index lap_idx and GPS channel with index channel_idx, request the samples contained in this Run.

The data will be returned in the form of a ChannelData object, which contains the data as a set of timestamps (the timestamps() getter returns a &Vec<f64>) and a corresponding set of samples (the samples() getter returns another &Vec<f64>).

For GPS raw channel with index channel_idx, request the channel name.

THIS SHOULD NEVER BE USED DIRECTLY AND IS ONLY PROVIDED AS AN INTERFACE TO THE UNDERLYING LIBRARY FUNCTION.

For GPS raw channel with index channel_idx, request the GPS channel unit.

THIS SHOULD NEVER BE USED DIRECTLY AND IS ONLY PROVIDED AS AN INTERFACE TO THE UNDERLYING LIBRARY FUNCTION.

For GPS raw channel with index channel_idx, request the number of samples contained in this Run.

THIS SHOULD NEVER BE USED DIRECTLY AND IS ONLY PROVIDED AS AN INTERFACE TO THE UNDERLYING LIBRARY FUNCTION.

For GPS raw channel with index channel_idx, request the samples contained in this Run.

The data will be returned in the form of a ChannelData object, which contains the data as a set of timestamps (the timestamps() getter returns a &Vec<f64>) and a corresponding set of samples (the samples() getter returns another &Vec<f64>).

THIS SHOULD NEVER BE USED DIRECTLY AND IS ONLY PROVIDED AS AN INTERFACE TO THE UNDERLYING LIBRARY FUNCTION.

For lap with index lap_idx and GPS raw channel with index channel_idx, request the number of samples contained in this Run.

THIS SHOULD NEVER BE USED DIRECTLY AND IS ONLY PROVIDED AS AN INTERFACE TO THE UNDERLYING LIBRARY FUNCTION.

For lap with index lap_idx and GPS raw channel with index channel_idx, request the samples contained in this Run.

The data will be returned in the form of a ChannelData object, which contains the data as a set of timestamps (the timestamps() getter returns a &Vec<f64>) and a corresponding set of samples (the samples() getter returns another &Vec<f64>).

THIS SHOULD NEVER BE USED DIRECTLY AND IS ONLY PROVIDED AS AN INTERFACE TO THE UNDERLYING LIBRARY FUNCTION.

Trait Implementations

Formats the value using the given formatter. Read more

Close the drk/xrk file on Run destruction

This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

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.