Skip to main content

refix_fix44/generated/components/
und_instrmt_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::{UndSecAltIDGrp, UnderlyingInstrument, UnderlyingStipulations};
7
8/// An instance of the `NoUnderlyings` (711) group.
9#[derive(Clone, Copy)]
10pub struct UndInstrmtGrp<'a>(refix_message::Scope<'a>);
11
12impl<'a> From<refix_message::Scope<'a>> for UndInstrmtGrp<'a> {
13    fn from(scope: refix_message::Scope<'a>) -> Self {
14        Self(scope)
15    }
16}
17
18impl<'a> UndInstrmtGrp<'a> {
19    pub(in super::super) const TABLE: GroupTable<'static> = GroupTable::new(
20        Tag(711),
21        Tag(311),
22        &[
23            Tag(241), Tag(242), Tag(243), Tag(244), Tag(245), Tag(246), Tag(247), Tag(256),
24            Tag(305), Tag(306), Tag(307), Tag(308), Tag(309), Tag(310), Tag(311), Tag(312),
25            Tag(313), Tag(315), Tag(316), Tag(317), Tag(318), Tag(362), Tag(363), Tag(364),
26            Tag(365), Tag(435), Tag(436), Tag(457), Tag(462), Tag(463), Tag(542), Tag(592),
27            Tag(593), Tag(594), Tag(595), Tag(763), Tag(810), Tag(877), Tag(878), Tag(879),
28            Tag(882), Tag(883), Tag(884), Tag(885), Tag(886), Tag(887), Tag(941),
29        ],
30        &[UndSecAltIDGrp::TABLE, UnderlyingStipulations::TABLE],
31    );
32
33    pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
34        static TAGS: LazyKnownTags = LazyKnownTags::new(
35            &[],
36            &[UnderlyingInstrument::known_tags()],
37        );
38        &TAGS
39    }
40
41    pub fn raw(&self) -> refix_message::Scope<'a> {
42        self.0
43    }
44
45    /// The `UnderlyingInstrument` component.
46    pub fn underlying_instrument(&self) -> UnderlyingInstrument<'a> {
47        UnderlyingInstrument(self.0, Self::known_tags().get())
48    }
49}
50
51impl std::fmt::Debug for UndInstrmtGrp<'_> {
52    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
53        write!(f, "UndInstrmtGrp({})", self.0)
54    }
55}