refix-codegen 0.8.0

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

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

/// The fields of the `SecurityXML` component.
#[derive(Clone, Copy)]
pub struct SecurityXML<'a>(pub(in super::super) refix_message::Scope<'a>);

impl<'a> SecurityXML<'a> {
    pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
        static TAGS: LazyKnownTags = LazyKnownTags::new(&[Tag(1186)], &[]);
        &TAGS
    }

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

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

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