refix_fix44/generated/components/
leg_benchmark_curve_data.rs1#![cfg_attr(rustfmt, rustfmt::skip)]
3
4use refix_message::{Decimal, InvalidValue, LazyKnownTags, Tag};
5
6#[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 #[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 #[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 #[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 #[doc(alias = "LegBenchmarkPrice")]
43 pub fn leg_benchmark_price(&self) -> Result<Option<Decimal>, InvalidValue> {
44 self.0.get_decimal(Tag(679))
45 }
46
47 #[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}