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, LazyKnownTags, Tag};

use super::{EvntGrp, Instrument, SecAltIDGrp};

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

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

impl<'a> InstrmtGrp<'a> {
    pub(in super::super) const TABLE: GroupTable<'static> = GroupTable::new(
        Tag(146),
        Tag(55),
        &[
            Tag(22), Tag(48), Tag(55), Tag(65), Tag(106), Tag(107), Tag(167), Tag(200), Tag(201),
            Tag(202), Tag(206), Tag(207), Tag(223), Tag(224), Tag(225), Tag(226), Tag(227),
            Tag(228), Tag(231), Tag(239), Tag(240), Tag(255), Tag(348), Tag(349), Tag(350),
            Tag(351), Tag(454), Tag(460), Tag(461), Tag(470), Tag(471), Tag(472), Tag(541),
            Tag(543), Tag(667), Tag(691), Tag(762), Tag(864), Tag(873), Tag(874), Tag(875),
            Tag(876), Tag(947),
        ],
        &[SecAltIDGrp::TABLE, EvntGrp::TABLE],
    );

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

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

    /// The `Instrument` component.
    pub fn instrument(&self) -> Instrument<'a> {
        Instrument(self.0, Self::known_tags().get())
    }
}

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