Open
Description
Thank you for this crate! It really takes the pain out of parsing my Garmin logs. 👍
I think it could be even more useful if it would contain structs for the message types, with each message field being a field of the struct. As you are already parsing the profile in build.rs
and auto-generating code from it, I think this should not be too complicated. For example, a representation of an Activity
message could look like this:
pub struct Activity {
pub total_timer_time: Option<f64>,
pub num_sessions: Option<u16>,
pub r#type: Option<fitparser::profile::field_type::Activity>,
// ....
}
impl TryFrom<fitparser::FitDataRecord> for Activity {
// ...
}
This would make it much easier to use the crate and also to discover the relevant message types and fields from the API docs. What are your thoughts on this?