Skip to main content

refix_fix44/generated/components/
leg_benchmark_curve_data.rs

1// @generated by refix codegen from FIX44.xml. Do not edit.
2#![cfg_attr(rustfmt, rustfmt::skip)]
3
4use refix_message::{Decimal, InvalidValue, LazyKnownTags, Tag};
5
6/// The fields of the `LegBenchmarkCurveData` component.
7#[derive(Clone, Copy)]
8pub struct LegBenchmarkCurveData<'a>(pub(in super::super) refix_message::Scope<'a>);
9
10impl<'a> LegBenchmarkCurveData<'a> {
11    pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
12        static TAGS: LazyKnownTags = LazyKnownTags::new(
13            &[Tag(676), Tag(677), Tag(678), Tag(679), Tag(680)],
14            &[],
15        );
16        &TAGS
17    }
18
19    pub fn raw(&self) -> refix_message::Scope<'a> {
20        self.0
21    }
22
23    /// The `LegBenchmarkCurveCurrency` (676) field.
24    #[doc(alias = "LegBenchmarkCurveCurrency")]
25    pub fn leg_benchmark_curve_currency(&self) -> Result<Option<&'a str>, InvalidValue> {
26        self.0.get_str(Tag(676))
27    }
28
29    /// The `LegBenchmarkCurveName` (677) field.
30    #[doc(alias = "LegBenchmarkCurveName")]
31    pub fn leg_benchmark_curve_name(&self) -> Result<Option<&'a str>, InvalidValue> {
32        self.0.get_str(Tag(677))
33    }
34
35    /// The `LegBenchmarkCurvePoint` (678) field.
36    #[doc(alias = "LegBenchmarkCurvePoint")]
37    pub fn leg_benchmark_curve_point(&self) -> Result<Option<&'a str>, InvalidValue> {
38        self.0.get_str(Tag(678))
39    }
40
41    /// The `LegBenchmarkPrice` (679) field.
42    #[doc(alias = "LegBenchmarkPrice")]
43    pub fn leg_benchmark_price(&self) -> Result<Option<Decimal>, InvalidValue> {
44        self.0.get_decimal(Tag(679))
45    }
46
47    /// The `LegBenchmarkPriceType` (680) field.
48    #[doc(alias = "LegBenchmarkPriceType")]
49    pub fn leg_benchmark_price_type(&self) -> Result<Option<i64>, InvalidValue> {
50        self.0.get_int(Tag(680))
51    }
52}
53
54impl std::fmt::Debug for LegBenchmarkCurveData<'_> {
55    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
56        write!(f, "LegBenchmarkCurveData({})", self.0.display_known(&Self::known_tags().get()))
57    }
58}