use ahash::HashMap;
use crate::parser::DataRecordType;
pub type Formatter = HashMap<(u32, u16), (&'static str, DataRecordType)>;
#[macro_export]
macro_rules! formatter {
{ $(($key:expr, $id:expr) => ($string:expr, $value:ident)),+ $(,)? } => {
HashMap::from_iter([
$( ((($key, $id), ($string, DataRecordType::$value))), )+
])
};
}
#[macro_export]
macro_rules! extend_formatter(
{ $formatter:ident += { $(($key:expr, $id:expr) => ($string:expr, $value:ident)),+ $(,)? } } => {
$formatter.extend([
$( ((($key, $id), ($string, DataRecordType::$value))), )+
])
};
);
include!(concat!(env!("OUT_DIR"), "/ipfix-information-elements.rs"));