[][src]Struct fitparser::parser::FitFileHeader

pub struct FitFileHeader {
    pub header_size: u8,
    pub protocol_ver_enc: f32,
    pub profile_ver_enc: f32,
    pub data_size: u32,
    pub crc: Option<u16>,
}

The file header provides information about the FIT File. The minimum size of the file header is 12 bytes including protocol and profile version numbers, the amount of data contained in the file and data type signature. The 12 byte header is considered legacy, using the 14 byte header is preferred. The header size should always be decoded before attempting to interpret a FIT file, Dynastream may extend the header as necessary. Computing the CRC is optional when using a 14 byte file header, it is permissible to set it to 0x0000.

header_size = u8, protocol_ver_enc = u8, profile_ver_enc = u16 data_size = u32 literal ".FIT" = [u8; 4] CRC = u16 (if the header_size is 14 bytes)

Fields

header_size: u8

Length of header in bytes, should be either 12 or 14

protocol_ver_enc: f32

Protocol version number as provided in SDK

profile_ver_enc: f32

Profile version number as provided in SDK

data_size: u32

Length of the Data Records section in bytes

crc: Option<u16>

Contains the value of the CRC of Bytes 0 through 13 CRC MSB 11, or may be set to 0x0000.

Trait Implementations

impl Clone for FitFileHeader[src]

impl Debug for FitFileHeader[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.