#![cfg_attr(rustfmt, rustfmt::skip)]
use refix_message::{GroupTable, InvalidValue, LazyKnownTags, Tag};
use super::super::enums::CollInquiryQualifier;
#[derive(Clone, Copy)]
pub struct CollInqQualGrp<'a>(refix_message::Scope<'a>);
impl<'a> From<refix_message::Scope<'a>> for CollInqQualGrp<'a> {
fn from(scope: refix_message::Scope<'a>) -> Self {
Self(scope)
}
}
impl<'a> CollInqQualGrp<'a> {
pub(in super::super) const TABLE: GroupTable<'static> = GroupTable::new(
Tag(938),
Tag(896),
&[Tag(896)],
&[],
);
pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
static TAGS: LazyKnownTags = LazyKnownTags::new(&[Tag(896)], &[]);
&TAGS
}
pub fn raw(&self) -> refix_message::Scope<'a> {
self.0
}
#[doc(alias = "CollInquiryQualifier")]
pub fn coll_inquiry_qualifier(&self) -> Result<Option<CollInquiryQualifier>, InvalidValue> {
Ok(self.0.get_int(Tag(896))?.map(CollInquiryQualifier::from_value))
}
}
impl std::fmt::Debug for CollInqQualGrp<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CollInqQualGrp({})", self.0)
}
}