Skip to main content

grib/def/grib2/
template1.rs

1use grib_template_derive::{Dump, TryFromSlice, WriteToBuffer};
2
3use super::table1;
4
5/// Identification template 1.0 - calendar definition.
6#[derive(Debug, PartialEq, Clone, TryFromSlice, WriteToBuffer, Dump)]
7pub struct Template1_0 {
8    pub calendar_type: table1::CalendarType,
9}
10
11/// Identification template 1.1 - paleontological offset.
12#[derive(Debug, PartialEq, Clone, TryFromSlice, WriteToBuffer, Dump)]
13pub struct Template1_1 {
14    /// Number of tens of thousands of years of offset.
15    pub paleontological_offset: u16,
16}
17
18/// Identification template 1.2 - calendar definition and paleontological
19/// offset.
20#[derive(Debug, PartialEq, Clone, TryFromSlice, WriteToBuffer, Dump)]
21pub struct Template1_2 {
22    pub calendar_type: table1::CalendarType,
23    /// Number of tens of thousands of years of offset.
24    pub paleontological_offset: u16,
25}