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::{Decimal, InvalidValue, LazyKnownTags, Tag};

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

impl<'a> LegBenchmarkCurveData<'a> {
    pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
        static TAGS: LazyKnownTags = LazyKnownTags::new(
            &[Tag(676), Tag(677), Tag(678), Tag(679), Tag(680)],
            &[],
        );
        &TAGS
    }

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

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

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

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

    /// The `LegBenchmarkPrice` (679) field.
    #[doc(alias = "LegBenchmarkPrice")]
    pub fn leg_benchmark_price(&self) -> Result<Option<Decimal>, InvalidValue> {
        self.0.get_decimal(Tag(679))
    }

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

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