hotfix_encoding/
definitions.rs1use crate::dict::FixDatatype;
12use crate::{dict, TagU32};
13
14#[derive(Debug, Clone)]
15#[doc(hidden)]
16pub struct HardCodedFixFieldDefinition {
17 pub name: &'static str,
18 pub tag: u32,
19 pub data_type: FixDatatype,
20 pub location: dict::FieldLocation,
21}
22
23impl dict::IsFieldDefinition for HardCodedFixFieldDefinition {
24 #[inline]
25 fn tag(&self) -> TagU32 {
26 TagU32::new(self.tag).expect("Invalid tag number 0.")
27 }
28
29 #[inline]
30 fn name(&self) -> &str {
31 self.name
32 }
33
34 #[inline]
35 fn location(&self) -> dict::FieldLocation {
36 self.location
37 }
38}
39
40#[cfg(feature = "fix42")]
41#[allow(dead_code, unused, warnings)]
42#[rustfmt::skip]
43pub mod fix42 {
45 include!(concat!(env!("OUT_DIR"), "/fix42.rs"));
46}
47
48#[allow(dead_code, unused, warnings)]
49#[rustfmt::skip]
50pub mod fix44 {
52 include!(concat!(env!("OUT_DIR"), "/fix44.rs"));
53}