pub struct Leg<'a> { /* private fields */ }Expand description
A session for Writer::leg to start: its sport, the pool of a pool
swim, the name of its profile, and whether the wearer moved to it by hand.
use fit_encoder::{Leg, Pool, Sport, SubSport};
let run = Leg::new(Sport::RUNNING, SubSport::TRAIL).named("Trail Run");
let swim = Leg::pool_swim(Pool::meters(25.0)).by_hand();Implementations§
Source§impl<'a> Leg<'a>
impl<'a> Leg<'a>
Sourcepub const fn new(sport: Sport, sub_sport: SubSport) -> Self
pub const fn new(sport: Sport, sub_sport: SubSport) -> Self
A session of sport; not lap_swimming, which Leg::pool_swim starts.
Sourcepub const fn pool_swim(pool: Pool) -> Self
pub const fn pool_swim(pool: Pool) -> Self
A pool swim in pool, whose lengths give its distance.
Sourcepub const fn named(self, name: &'a str) -> Self
pub const fn named(self, name: &'a str) -> Self
The name of the sport’s profile on the device, such as “Open Water”, up to
SPORT_NAME_MAX bytes.
Sourcepub const fn by_hand(self) -> Self
pub const fn by_hand(self) -> Self
The wearer moved to it by hand, in an activity whose profile otherwise moves on by
itself (Options::auto_multisport): the session
before it was ended manual. Without that option every session is. Not a first leg.
Trait Implementations§
impl<'a> Copy for Leg<'a>
impl<'a> Eq for Leg<'a>
impl<'a> StructuralPartialEq for Leg<'a>
Auto Trait Implementations§
impl<'a> Forget for Leg<'a>
impl<'a> Freeze for Leg<'a>
impl<'a> Move for Leg<'a>
impl<'a> RefUnwindSafe for Leg<'a>
impl<'a> Send for Leg<'a>
impl<'a> Sync for Leg<'a>
impl<'a> Unpin for Leg<'a>
impl<'a> UnsafeUnpin for Leg<'a>where
&'a str: UnsafeUnpin,
impl<'a> UnwindSafe for Leg<'a>where
&'a str: UnwindSafe,
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
Mutably borrows from an owned value. Read more