refix_fix44/generated/components/
ptys_sub_grp.rs1#![cfg_attr(rustfmt, rustfmt::skip)]
3
4use refix_message::{GroupTable, InvalidValue, LazyKnownTags, Tag};
5
6use super::super::enums::PartySubIDType;
7
8#[derive(Clone, Copy)]
10pub struct PtysSubGrp<'a>(refix_message::Scope<'a>);
11
12impl<'a> From<refix_message::Scope<'a>> for PtysSubGrp<'a> {
13 fn from(scope: refix_message::Scope<'a>) -> Self {
14 Self(scope)
15 }
16}
17
18impl<'a> PtysSubGrp<'a> {
19 pub(in super::super) const TABLE: GroupTable<'static> = GroupTable::new(
20 Tag(802),
21 Tag(523),
22 &[Tag(523), Tag(803)],
23 &[],
24 );
25
26 pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
27 static TAGS: LazyKnownTags = LazyKnownTags::new(&[Tag(523), Tag(803)], &[]);
28 &TAGS
29 }
30
31 pub fn raw(&self) -> refix_message::Scope<'a> {
32 self.0
33 }
34
35 #[doc(alias = "PartySubID")]
37 pub fn party_sub_id(&self) -> Result<Option<&'a str>, InvalidValue> {
38 self.0.get_str(Tag(523))
39 }
40
41 #[doc(alias = "PartySubIDType")]
43 pub fn party_sub_id_type(&self) -> Result<Option<PartySubIDType>, InvalidValue> {
44 Ok(self.0.get_int(Tag(803))?.map(PartySubIDType::from_value))
45 }
46}
47
48impl std::fmt::Debug for PtysSubGrp<'_> {
49 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
50 write!(f, "PtysSubGrp({})", self.0)
51 }
52}