Closed tiphaineruy closed 3 years ago
Simplest would be
/// Navigation status for VesselDynamicData
pub enum NavigationStatus { UnderWayUsingEngine = 0, // 0 AtAnchor = 1, // 1 NotUnderCommand = 2, // 2 .... }
allowing let nav_status = NavigationStatus::UnderWayUsingEngine as u8
Issue: When parsing an AIS frame. you sometime might want to access the raw data.
example: VesselDynamicData.nav_status is an enum constructed from an u8 field. If you need to use the parser as an intermediate parser for other tool, you might want to use the underlying u8 and not manipulate the enum
solutions: