Skip to main content

refix_fix44/generated/components/
instrmt_leg_grp.rs

1// @generated by refix codegen from FIX44.xml. Do not edit.
2#![cfg_attr(rustfmt, rustfmt::skip)]
3
4use refix_message::{GroupTable, LazyKnownTags, Tag};
5
6use super::{InstrumentLeg, LegSecAltIDGrp};
7
8/// An instance of the `NoLegs` (555) group.
9#[derive(Clone, Copy)]
10pub struct InstrmtLegGrp<'a>(refix_message::Scope<'a>);
11
12impl<'a> From<refix_message::Scope<'a>> for InstrmtLegGrp<'a> {
13    fn from(scope: refix_message::Scope<'a>) -> Self {
14        Self(scope)
15    }
16}
17
18impl<'a> InstrmtLegGrp<'a> {
19    pub(in super::super) const TABLE: GroupTable<'static> = GroupTable::new(
20        Tag(555),
21        Tag(600),
22        &[
23            Tag(248), Tag(249), Tag(250), Tag(251), Tag(252), Tag(253), Tag(254), Tag(257),
24            Tag(556), Tag(596), Tag(597), Tag(598), Tag(599), Tag(600), Tag(601), Tag(602),
25            Tag(603), Tag(604), Tag(607), Tag(608), Tag(609), Tag(610), Tag(611), Tag(612),
26            Tag(613), Tag(614), Tag(615), Tag(616), Tag(617), Tag(618), Tag(619), Tag(620),
27            Tag(621), Tag(622), Tag(623), Tag(624), Tag(739), Tag(740), Tag(764), Tag(942),
28            Tag(955), Tag(956),
29        ],
30        &[LegSecAltIDGrp::TABLE],
31    );
32
33    pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
34        static TAGS: LazyKnownTags = LazyKnownTags::new(&[], &[InstrumentLeg::known_tags()]);
35        &TAGS
36    }
37
38    pub fn raw(&self) -> refix_message::Scope<'a> {
39        self.0
40    }
41
42    /// The `InstrumentLeg` component.
43    pub fn instrument_leg(&self) -> InstrumentLeg<'a> {
44        InstrumentLeg(self.0, Self::known_tags().get())
45    }
46}
47
48impl std::fmt::Debug for InstrmtLegGrp<'_> {
49    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
50        write!(f, "InstrmtLegGrp({})", self.0)
51    }
52}