refix-fix44 0.12.0

Typed FIX 4.4 protocol messages for the ReFIX engine
Documentation
// @generated by refix codegen from FIX44.xml. Do not edit.
#![cfg_attr(rustfmt, rustfmt::skip)]

use refix_message::{GroupTable, InvalidValue, LazyKnownTags, Tag};

/// An instance of the `NoNested3PartySubIDs` (952) group.
#[derive(Clone, Copy)]
pub struct NstdPtys3SubGrp<'a>(refix_message::Scope<'a>);

impl<'a> From<refix_message::Scope<'a>> for NstdPtys3SubGrp<'a> {
    fn from(scope: refix_message::Scope<'a>) -> Self {
        Self(scope)
    }
}

impl<'a> NstdPtys3SubGrp<'a> {
    pub(in super::super) const TABLE: GroupTable<'static> = GroupTable::new(
        Tag(952),
        Tag(953),
        &[Tag(953), Tag(954)],
        &[],
    );

    pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
        static TAGS: LazyKnownTags = LazyKnownTags::new(&[Tag(953), Tag(954)], &[]);
        &TAGS
    }

    pub fn raw(&self) -> refix_message::Scope<'a> {
        self.0
    }

    /// The `Nested3PartySubID` (953) field.
    #[doc(alias = "Nested3PartySubID")]
    pub fn nested3_party_sub_id(&self) -> Result<Option<&'a str>, InvalidValue> {
        self.0.get_str(Tag(953))
    }

    /// The `Nested3PartySubIDType` (954) field.
    #[doc(alias = "Nested3PartySubIDType")]
    pub fn nested3_party_sub_id_type(&self) -> Result<Option<i64>, InvalidValue> {
        self.0.get_int(Tag(954))
    }
}

impl std::fmt::Debug for NstdPtys3SubGrp<'_> {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "NstdPtys3SubGrp({})", self.0)
    }
}