use crate::dict::FixDatatype;
use crate::{dict, TagU32};
#[derive(Debug, Clone)]
#[doc(hidden)]
pub struct HardCodedFixFieldDefinition {
pub name: &'static str,
pub tag: u32,
pub data_type: FixDatatype,
pub location: dict::FieldLocation,
}
impl dict::IsFieldDefinition for HardCodedFixFieldDefinition {
#[inline]
fn tag(&self) -> TagU32 {
TagU32::new(self.tag).expect("Invalid tag number 0.")
}
#[inline]
fn name(&self) -> &str {
self.name
}
#[inline]
fn location(&self) -> dict::FieldLocation {
self.location
}
}
#[cfg(feature = "fix42")]
#[allow(dead_code, unused, warnings)]
#[rustfmt::skip]
pub mod fix42 {
include!(concat!(env!("OUT_DIR"), "/fix42.rs"));
}
#[allow(dead_code, unused, warnings)]
#[rustfmt::skip]
pub mod fix44 {
include!(concat!(env!("OUT_DIR"), "/fix44.rs"));
}