[−][src]Function fitsdk::match_message_field
pub fn match_message_field(m: MessageType) -> &'static MatchFieldTypeFn
Determines a specific FieldType
of any MessageType
.
The method is called with a MessageType
argument and returns a static closure
which is called with a field_id usize
and yields a FieldType
.
Any field that is not defined will return a FieldType::None
variant.
Example
let message_type = MessageType::WorkoutSession; let parsed_value = 3; let field_fn = match_message_field(message_type); let field = field_fn(parsed_value); assert_eq!(field, Field:type::Uint16);