[−][src]Function fitsdk::match_message_offset
pub fn match_message_offset(m: MessageType) -> &'static MatchOffsetFn
Determines whether any SDK-defined Message
defines an offset for any of its fields.
The method is called with a MessageType
argument and returns a static closure which is called with a
field_id usize
which yields an Option<i16>
.
Example
let message_type = MessageType::Session; let parsed_value = 71; let offset_fn = match_message_offset(message_type); let offset = offset_fn(parsed_value); assert_eq!(offset, Some(500.0));