Skip to main content

refix_fix44/generated/components/
comp_id_req_grp.rs

1// @generated by refix codegen from FIX44.xml. Do not edit.
2#![cfg_attr(rustfmt, rustfmt::skip)]
3
4use refix_message::{GroupTable, InvalidValue, LazyKnownTags, Tag};
5
6/// An instance of the `NoCompIDs` (936) group.
7#[derive(Clone, Copy)]
8pub struct CompIDReqGrp<'a>(refix_message::Scope<'a>);
9
10impl<'a> From<refix_message::Scope<'a>> for CompIDReqGrp<'a> {
11    fn from(scope: refix_message::Scope<'a>) -> Self {
12        Self(scope)
13    }
14}
15
16impl<'a> CompIDReqGrp<'a> {
17    pub(in super::super) const TABLE: GroupTable<'static> = GroupTable::new(
18        Tag(936),
19        Tag(930),
20        &[Tag(283), Tag(284), Tag(930), Tag(931)],
21        &[],
22    );
23
24    pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
25        static TAGS: LazyKnownTags = LazyKnownTags::new(
26            &[Tag(930), Tag(931), Tag(283), Tag(284)],
27            &[],
28        );
29        &TAGS
30    }
31
32    pub fn raw(&self) -> refix_message::Scope<'a> {
33        self.0
34    }
35
36    /// The `RefCompID` (930) field.
37    #[doc(alias = "RefCompID")]
38    pub fn ref_comp_id(&self) -> Result<Option<&'a str>, InvalidValue> {
39        self.0.get_str(Tag(930))
40    }
41
42    /// The `RefSubID` (931) field.
43    #[doc(alias = "RefSubID")]
44    pub fn ref_sub_id(&self) -> Result<Option<&'a str>, InvalidValue> {
45        self.0.get_str(Tag(931))
46    }
47
48    /// The `LocationID` (283) field.
49    #[doc(alias = "LocationID")]
50    pub fn location_id(&self) -> Result<Option<&'a str>, InvalidValue> {
51        self.0.get_str(Tag(283))
52    }
53
54    /// The `DeskID` (284) field.
55    #[doc(alias = "DeskID")]
56    pub fn desk_id(&self) -> Result<Option<&'a str>, InvalidValue> {
57        self.0.get_str(Tag(284))
58    }
59}
60
61impl std::fmt::Debug for CompIDReqGrp<'_> {
62    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
63        write!(f, "CompIDReqGrp({})", self.0)
64    }
65}