grib/
datatypes.rs

1mod product_attributes;
2pub use product_attributes::*;
3mod sections;
4pub use sections::*;
5
6pub type MessageIndex = (usize, usize);
7
8pub(crate) struct Grib2SubmessageIndex(
9    pub(crate) usize,
10    pub(crate) usize,
11    pub(crate) Option<usize>,
12    pub(crate) usize,
13    pub(crate) usize,
14    pub(crate) usize,
15    pub(crate) usize,
16    pub(crate) usize,
17    pub(crate) usize,
18    MessageIndex,
19);
20
21impl Grib2SubmessageIndex {
22    pub(crate) fn new(
23        message_index: MessageIndex,
24        section_indices: (
25            usize,
26            usize,
27            Option<usize>,
28            usize,
29            usize,
30            usize,
31            usize,
32            usize,
33            usize,
34        ),
35    ) -> Self {
36        Self(
37            section_indices.0,
38            section_indices.1,
39            section_indices.2,
40            section_indices.3,
41            section_indices.4,
42            section_indices.5,
43            section_indices.6,
44            section_indices.7,
45            section_indices.8,
46            message_index,
47        )
48    }
49
50    pub(crate) fn message_index(&self) -> MessageIndex {
51        self.9
52    }
53}