pub struct CoursePoint {
pub message_index: MessageIndex,
pub timestamp: DateTime,
pub position_lat: i32,
pub position_long: i32,
pub distance: u32,
pub type: CoursePoint,
pub name: String,
pub favorite: Bool,
pub unknown_fields: Vec<Field>,
pub developer_fields: Vec<DeveloperField>,
}
Expand description
CoursePoint is a CoursePoint message.
Fields§
§message_index: MessageIndex
§timestamp: DateTime
§position_lat: i32
Units: semicircles
position_long: i32
Units: semicircles
distance: u32
Scale: 100; Units: m
type: CoursePoint
§name: String
§favorite: Bool
§unknown_fields: Vec<Field>
unknown_fields are fields that are exist but they are not defined in Profile.xlsx
developer_fields: Vec<DeveloperField>
developer_fields are custom data fields (Added since protocol version 2.0)
Implementations§
Source§impl CoursePoint
impl CoursePoint
Sourcepub const MESSAGE_INDEX: u8 = 254u8
pub const MESSAGE_INDEX: u8 = 254u8
Value’s type: u16
Sourcepub const POSITION_LAT: u8 = 2u8
pub const POSITION_LAT: u8 = 2u8
Value’s type: i32
; Units: semicircles
Sourcepub const POSITION_LONG: u8 = 3u8
pub const POSITION_LONG: u8 = 3u8
Value’s type: i32
; Units: semicircles
Sourcepub fn new() -> Self
pub fn new() -> Self
Create new CoursePoint with all fields being set to its corresponding invalid value.
Sourcepub fn distance_scaled(&self) -> f64
pub fn distance_scaled(&self) -> f64
Returns distance
in its scaled value. It returns invalid f64 when value is valid.
Sourcepub fn set_distance_scaled(&mut self, v: f64) -> &mut CoursePoint
pub fn set_distance_scaled(&mut self, v: f64) -> &mut CoursePoint
Set distance
with scaled value, it will automatically be converted to its corresponding integer value.
Trait Implementations§
Source§impl Clone for CoursePoint
impl Clone for CoursePoint
Source§fn clone(&self) -> CoursePoint
fn clone(&self) -> CoursePoint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CoursePoint
impl Debug for CoursePoint
Source§impl Default for CoursePoint
impl Default for CoursePoint
Source§impl From<&Message> for CoursePoint
impl From<&Message> for CoursePoint
Source§impl From<CoursePoint> for Message
impl From<CoursePoint> for Message
Source§fn from(m: CoursePoint) -> Self
fn from(m: CoursePoint) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CoursePoint
impl RefUnwindSafe for CoursePoint
impl Send for CoursePoint
impl Sync for CoursePoint
impl Unpin for CoursePoint
impl UnwindSafe for CoursePoint
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