pub struct FitCourseOptions { /* private fields */ }
Expand description
Options for writing a FIT course
Implementations§
Source§impl FitCourseOptions
impl FitCourseOptions
Sourcepub fn with_speed(self, speed: MeterPerSecond<f64>) -> Self
pub fn with_speed(self, speed: MeterPerSecond<f64>) -> Self
Write the FIT file using the given speed for record timestamps
This has the effect of setting the speed of the Virtual Partner on compatible Garmin devices.
Sourcepub fn with_start_time(self, start_time: DateTime<Utc>) -> Self
pub fn with_start_time(self, start_time: DateTime<Utc>) -> Self
Set the timestamp at which the course starts
Controls the timestamps on lap and record messages. An arbitrary, but consistent and reproducible, time will be used if left unset.
Sourcepub fn with_sport(self, sport: Sport) -> Self
pub fn with_sport(self, sport: Sport) -> Self
Set the course’s sport
Defaults to cycling
if unset.
Sourcepub fn with_product_name(self, product_name: String) -> Self
pub fn with_product_name(self, product_name: String) -> Self
Set the product name to encode
The first 13 bytes of this string will go in the file_id
message’s
product_name
field. Defaults to the empty string if unset.
Sourcepub fn with_software_version(self, software_version: u16) -> Self
pub fn with_software_version(self, software_version: u16) -> Self
Set the software version to encode
This goes in the file_creator
message’s software_version
field. Zero
by default.
Sourcepub fn with_hardware_version(self, hardware_version: u8) -> Self
pub fn with_hardware_version(self, hardware_version: u8) -> Self
Set the hardware version to encode
This goes in the file_creator
message’s hardware_version
field. Zero
by default.
Trait Implementations§
Source§impl Clone for FitCourseOptions
impl Clone for FitCourseOptions
Source§fn clone(&self) -> FitCourseOptions
fn clone(&self) -> FitCourseOptions
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for FitCourseOptions
impl Debug for FitCourseOptions
Auto Trait Implementations§
impl Freeze for FitCourseOptions
impl RefUnwindSafe for FitCourseOptions
impl Send for FitCourseOptions
impl Sync for FitCourseOptions
impl Unpin for FitCourseOptions
impl UnwindSafe for FitCourseOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more