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