1#![cfg_attr(rustfmt, rustfmt::skip)]
3
4use refix_message::{
5 Date, Decimal, GroupTable, Instances, InvalidValue, LazyKnownTags, MonthYear, RawMessage, Tag,
6 UtcTimestamp,
7};
8
9use super::super::components::{Header, Trailer};
10use super::super::enums::{
11 AllocHandlInst, AllocLinkType, AllocTransType, CommType, IDSource, LastCapacity, MiscFeeType,
12 OpenClose, ProcessCode, PutOrCall, SecurityType, SettlInstMode, SettlmntTyp, Side,
13};
14
15pub struct Allocation(RawMessage);
17
18impl Allocation {
19 pub const MSG_TYPE: &[u8] = b"J";
20
21 pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
22 static TAGS: LazyKnownTags = LazyKnownTags::new(
23 &[
24 Tag(70), Tag(71), Tag(72), Tag(196), Tag(197), Tag(73), Tag(124), Tag(54), Tag(55),
25 Tag(65), Tag(48), Tag(22), Tag(167), Tag(200), Tag(205), Tag(201), Tag(202),
26 Tag(206), Tag(231), Tag(223), Tag(207), Tag(106), Tag(348), Tag(349), Tag(107),
27 Tag(350), Tag(351), Tag(53), Tag(30), Tag(336), Tag(6), Tag(15), Tag(74), Tag(75),
28 Tag(60), Tag(63), Tag(64), Tag(381), Tag(118), Tag(77), Tag(58), Tag(354), Tag(355),
29 Tag(157), Tag(158), Tag(78),
30 ],
31 &[
32 Header::known_tags(), Trailer::known_tags(), AllocationOrders::known_tags(),
33 AllocationExecs::known_tags(), AllocationAllocs::known_tags(),
34 ],
35 );
36 &TAGS
37 }
38
39 pub fn from_raw(raw: RawMessage) -> Self {
40 Self(raw)
41 }
42
43 pub fn raw(&self) -> &RawMessage {
44 &self.0
45 }
46
47 pub fn header(&self) -> Header<'_> {
48 Header(self.0.scope())
49 }
50
51 pub fn trailer(&self) -> Trailer<'_> {
52 Trailer(self.0.scope())
53 }
54
55 #[doc(alias = "AllocID")]
57 pub fn alloc_id(&self) -> Result<Option<&str>, InvalidValue> {
58 self.0.get_str(Tag(70))
59 }
60
61 #[doc(alias = "AllocTransType")]
63 pub fn alloc_trans_type(&self) -> Result<Option<AllocTransType<'_>>, InvalidValue> {
64 Ok(self.0.get_str(Tag(71))?.map(AllocTransType::from_value))
65 }
66
67 #[doc(alias = "RefAllocID")]
69 pub fn ref_alloc_id(&self) -> Result<Option<&str>, InvalidValue> {
70 self.0.get_str(Tag(72))
71 }
72
73 #[doc(alias = "AllocLinkID")]
75 pub fn alloc_link_id(&self) -> Result<Option<&str>, InvalidValue> {
76 self.0.get_str(Tag(196))
77 }
78
79 #[doc(alias = "AllocLinkType")]
81 pub fn alloc_link_type(&self) -> Result<Option<AllocLinkType>, InvalidValue> {
82 Ok(self.0.get_int(Tag(197))?.map(AllocLinkType::from_value))
83 }
84
85 #[doc(alias = "NoOrders")]
87 pub fn orders(&self) -> Result<Instances<'_, AllocationOrders<'_>>, InvalidValue> {
88 self.0.get_group(&AllocationOrders::TABLE, &Self::known_tags().get()).map(Instances::from)
89 }
90
91 #[doc(alias = "NoExecs")]
93 pub fn execs(&self) -> Result<Instances<'_, AllocationExecs<'_>>, InvalidValue> {
94 self.0.get_group(&AllocationExecs::TABLE, &Self::known_tags().get()).map(Instances::from)
95 }
96
97 #[doc(alias = "Side")]
99 pub fn side(&self) -> Result<Option<Side<'_>>, InvalidValue> {
100 Ok(self.0.get_str(Tag(54))?.map(Side::from_value))
101 }
102
103 #[doc(alias = "Symbol")]
105 pub fn symbol(&self) -> Result<Option<&str>, InvalidValue> {
106 self.0.get_str(Tag(55))
107 }
108
109 #[doc(alias = "SymbolSfx")]
111 pub fn symbol_sfx(&self) -> Result<Option<&str>, InvalidValue> {
112 self.0.get_str(Tag(65))
113 }
114
115 #[doc(alias = "SecurityID")]
117 pub fn security_id(&self) -> Result<Option<&str>, InvalidValue> {
118 self.0.get_str(Tag(48))
119 }
120
121 #[doc(alias = "IDSource")]
123 pub fn id_source(&self) -> Result<Option<IDSource<'_>>, InvalidValue> {
124 Ok(self.0.get_str(Tag(22))?.map(IDSource::from_value))
125 }
126
127 #[doc(alias = "SecurityType")]
129 pub fn security_type(&self) -> Result<Option<SecurityType<'_>>, InvalidValue> {
130 Ok(self.0.get_str(Tag(167))?.map(SecurityType::from_value))
131 }
132
133 #[doc(alias = "MaturityMonthYear")]
135 pub fn maturity_month_year(&self) -> Result<Option<MonthYear>, InvalidValue> {
136 self.0.get_month_year(Tag(200))
137 }
138
139 #[doc(alias = "MaturityDay")]
141 pub fn maturity_day(&self) -> Result<Option<i64>, InvalidValue> {
142 self.0.get_int(Tag(205))
143 }
144
145 #[doc(alias = "PutOrCall")]
147 pub fn put_or_call(&self) -> Result<Option<PutOrCall>, InvalidValue> {
148 Ok(self.0.get_int(Tag(201))?.map(PutOrCall::from_value))
149 }
150
151 #[doc(alias = "StrikePrice")]
153 pub fn strike_price(&self) -> Result<Option<Decimal>, InvalidValue> {
154 self.0.get_decimal(Tag(202))
155 }
156
157 #[doc(alias = "OptAttribute")]
159 pub fn opt_attribute(&self) -> Result<Option<&str>, InvalidValue> {
160 self.0.get_str(Tag(206))
161 }
162
163 #[doc(alias = "ContractMultiplier")]
165 pub fn contract_multiplier(&self) -> Result<Option<Decimal>, InvalidValue> {
166 self.0.get_decimal(Tag(231))
167 }
168
169 #[doc(alias = "CouponRate")]
171 pub fn coupon_rate(&self) -> Result<Option<Decimal>, InvalidValue> {
172 self.0.get_decimal(Tag(223))
173 }
174
175 #[doc(alias = "SecurityExchange")]
177 pub fn security_exchange(&self) -> Result<Option<&str>, InvalidValue> {
178 self.0.get_str(Tag(207))
179 }
180
181 #[doc(alias = "Issuer")]
183 pub fn issuer(&self) -> Result<Option<&str>, InvalidValue> {
184 self.0.get_str(Tag(106))
185 }
186
187 #[doc(alias = "EncodedIssuerLen")]
189 pub fn encoded_issuer_len(&self) -> Result<Option<i64>, InvalidValue> {
190 self.0.get_int(Tag(348))
191 }
192
193 #[doc(alias = "EncodedIssuer")]
195 pub fn encoded_issuer(&self) -> Option<&[u8]> {
196 self.0.get(Tag(349))
197 }
198
199 #[doc(alias = "SecurityDesc")]
201 pub fn security_desc(&self) -> Result<Option<&str>, InvalidValue> {
202 self.0.get_str(Tag(107))
203 }
204
205 #[doc(alias = "EncodedSecurityDescLen")]
207 pub fn encoded_security_desc_len(&self) -> Result<Option<i64>, InvalidValue> {
208 self.0.get_int(Tag(350))
209 }
210
211 #[doc(alias = "EncodedSecurityDesc")]
213 pub fn encoded_security_desc(&self) -> Option<&[u8]> {
214 self.0.get(Tag(351))
215 }
216
217 #[doc(alias = "Shares")]
219 pub fn shares(&self) -> Result<Option<Decimal>, InvalidValue> {
220 self.0.get_decimal(Tag(53))
221 }
222
223 #[doc(alias = "LastMkt")]
225 pub fn last_mkt(&self) -> Result<Option<&str>, InvalidValue> {
226 self.0.get_str(Tag(30))
227 }
228
229 #[doc(alias = "TradingSessionID")]
231 pub fn trading_session_id(&self) -> Result<Option<&str>, InvalidValue> {
232 self.0.get_str(Tag(336))
233 }
234
235 #[doc(alias = "AvgPx")]
237 pub fn avg_px(&self) -> Result<Option<Decimal>, InvalidValue> {
238 self.0.get_decimal(Tag(6))
239 }
240
241 #[doc(alias = "Currency")]
243 pub fn currency(&self) -> Result<Option<&str>, InvalidValue> {
244 self.0.get_str(Tag(15))
245 }
246
247 #[doc(alias = "AvgPrxPrecision")]
249 pub fn avg_prx_precision(&self) -> Result<Option<i64>, InvalidValue> {
250 self.0.get_int(Tag(74))
251 }
252
253 #[doc(alias = "TradeDate")]
255 pub fn trade_date(&self) -> Result<Option<Date>, InvalidValue> {
256 self.0.get_date(Tag(75))
257 }
258
259 #[doc(alias = "TransactTime")]
261 pub fn transact_time(&self) -> Result<Option<UtcTimestamp>, InvalidValue> {
262 self.0.get_utc_timestamp(Tag(60))
263 }
264
265 #[doc(alias = "SettlmntTyp")]
267 pub fn settlmnt_typ(&self) -> Result<Option<SettlmntTyp<'_>>, InvalidValue> {
268 Ok(self.0.get_str(Tag(63))?.map(SettlmntTyp::from_value))
269 }
270
271 #[doc(alias = "FutSettDate")]
273 pub fn fut_sett_date(&self) -> Result<Option<Date>, InvalidValue> {
274 self.0.get_date(Tag(64))
275 }
276
277 #[doc(alias = "GrossTradeAmt")]
279 pub fn gross_trade_amt(&self) -> Result<Option<Decimal>, InvalidValue> {
280 self.0.get_decimal(Tag(381))
281 }
282
283 #[doc(alias = "NetMoney")]
285 pub fn net_money(&self) -> Result<Option<Decimal>, InvalidValue> {
286 self.0.get_decimal(Tag(118))
287 }
288
289 #[doc(alias = "OpenClose")]
291 pub fn open_close(&self) -> Result<Option<OpenClose<'_>>, InvalidValue> {
292 Ok(self.0.get_str(Tag(77))?.map(OpenClose::from_value))
293 }
294
295 #[doc(alias = "Text")]
297 pub fn text(&self) -> Result<Option<&str>, InvalidValue> {
298 self.0.get_str(Tag(58))
299 }
300
301 #[doc(alias = "EncodedTextLen")]
303 pub fn encoded_text_len(&self) -> Result<Option<i64>, InvalidValue> {
304 self.0.get_int(Tag(354))
305 }
306
307 #[doc(alias = "EncodedText")]
309 pub fn encoded_text(&self) -> Option<&[u8]> {
310 self.0.get(Tag(355))
311 }
312
313 #[doc(alias = "NumDaysInterest")]
315 pub fn num_days_interest(&self) -> Result<Option<i64>, InvalidValue> {
316 self.0.get_int(Tag(157))
317 }
318
319 #[doc(alias = "AccruedInterestRate")]
321 pub fn accrued_interest_rate(&self) -> Result<Option<Decimal>, InvalidValue> {
322 self.0.get_decimal(Tag(158))
323 }
324
325 #[doc(alias = "NoAllocs")]
327 pub fn allocs(&self) -> Result<Instances<'_, AllocationAllocs<'_>>, InvalidValue> {
328 self.0.get_group(&AllocationAllocs::TABLE, &Self::known_tags().get()).map(Instances::from)
329 }
330}
331
332impl std::fmt::Debug for Allocation {
333 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
334 write!(f, "Allocation({})", self.0)
335 }
336}
337
338impl std::fmt::Display for Allocation {
339 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
340 std::fmt::Display::fmt(&self.0, f)
341 }
342}
343
344#[derive(Clone, Copy)]
346pub struct AllocationOrders<'a>(refix_message::Scope<'a>);
347
348impl<'a> From<refix_message::Scope<'a>> for AllocationOrders<'a> {
349 fn from(scope: refix_message::Scope<'a>) -> Self {
350 Self(scope)
351 }
352}
353
354impl<'a> AllocationOrders<'a> {
355 pub(in super::super) const TABLE: GroupTable<'static> = GroupTable::new(
356 Tag(73),
357 Tag(11),
358 &[Tag(11), Tag(37), Tag(66), Tag(105), Tag(198)],
359 &[],
360 );
361
362 pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
363 static TAGS: LazyKnownTags = LazyKnownTags::new(
364 &[Tag(11), Tag(37), Tag(198), Tag(66), Tag(105)],
365 &[],
366 );
367 &TAGS
368 }
369
370 pub fn raw(&self) -> refix_message::Scope<'a> {
371 self.0
372 }
373
374 #[doc(alias = "ClOrdID")]
376 pub fn cl_ord_id(&self) -> Result<Option<&'a str>, InvalidValue> {
377 self.0.get_str(Tag(11))
378 }
379
380 #[doc(alias = "OrderID")]
382 pub fn order_id(&self) -> Result<Option<&'a str>, InvalidValue> {
383 self.0.get_str(Tag(37))
384 }
385
386 #[doc(alias = "SecondaryOrderID")]
388 pub fn secondary_order_id(&self) -> Result<Option<&'a str>, InvalidValue> {
389 self.0.get_str(Tag(198))
390 }
391
392 #[doc(alias = "ListID")]
394 pub fn list_id(&self) -> Result<Option<&'a str>, InvalidValue> {
395 self.0.get_str(Tag(66))
396 }
397
398 #[doc(alias = "WaveNo")]
400 pub fn wave_no(&self) -> Result<Option<&'a str>, InvalidValue> {
401 self.0.get_str(Tag(105))
402 }
403}
404
405impl std::fmt::Debug for AllocationOrders<'_> {
406 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
407 write!(f, "AllocationOrders({})", self.0)
408 }
409}
410
411#[derive(Clone, Copy)]
413pub struct AllocationExecs<'a>(refix_message::Scope<'a>);
414
415impl<'a> From<refix_message::Scope<'a>> for AllocationExecs<'a> {
416 fn from(scope: refix_message::Scope<'a>) -> Self {
417 Self(scope)
418 }
419}
420
421impl<'a> AllocationExecs<'a> {
422 pub(in super::super) const TABLE: GroupTable<'static> = GroupTable::new(
423 Tag(124),
424 Tag(32),
425 &[Tag(17), Tag(29), Tag(31), Tag(32)],
426 &[],
427 );
428
429 pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
430 static TAGS: LazyKnownTags = LazyKnownTags::new(
431 &[Tag(32), Tag(17), Tag(31), Tag(29)],
432 &[],
433 );
434 &TAGS
435 }
436
437 pub fn raw(&self) -> refix_message::Scope<'a> {
438 self.0
439 }
440
441 #[doc(alias = "LastShares")]
443 pub fn last_shares(&self) -> Result<Option<Decimal>, InvalidValue> {
444 self.0.get_decimal(Tag(32))
445 }
446
447 #[doc(alias = "ExecID")]
449 pub fn exec_id(&self) -> Result<Option<&'a str>, InvalidValue> {
450 self.0.get_str(Tag(17))
451 }
452
453 #[doc(alias = "LastPx")]
455 pub fn last_px(&self) -> Result<Option<Decimal>, InvalidValue> {
456 self.0.get_decimal(Tag(31))
457 }
458
459 #[doc(alias = "LastCapacity")]
461 pub fn last_capacity(&self) -> Result<Option<LastCapacity<'a>>, InvalidValue> {
462 Ok(self.0.get_str(Tag(29))?.map(LastCapacity::from_value))
463 }
464}
465
466impl std::fmt::Debug for AllocationExecs<'_> {
467 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
468 write!(f, "AllocationExecs({})", self.0)
469 }
470}
471
472#[derive(Clone, Copy)]
474pub struct AllocationAllocs<'a>(refix_message::Scope<'a>);
475
476impl<'a> From<refix_message::Scope<'a>> for AllocationAllocs<'a> {
477 fn from(scope: refix_message::Scope<'a>) -> Self {
478 Self(scope)
479 }
480}
481
482impl<'a> AllocationAllocs<'a> {
483 pub(in super::super) const TABLE: GroupTable<'static> = GroupTable::new(
484 Tag(78),
485 Tag(79),
486 &[
487 Tag(12), Tag(13), Tag(76), Tag(79), Tag(80), Tag(81), Tag(92), Tag(109), Tag(119),
488 Tag(120), Tag(136), Tag(153), Tag(154), Tag(155), Tag(156), Tag(159), Tag(160),
489 Tag(161), Tag(208), Tag(209), Tag(360), Tag(361), Tag(366),
490 ],
491 &[AllocationAllocsMiscFees::TABLE],
492 );
493
494 pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
495 static TAGS: LazyKnownTags = LazyKnownTags::new(
496 &[
497 Tag(79), Tag(366), Tag(80), Tag(81), Tag(92), Tag(208), Tag(209), Tag(161),
498 Tag(360), Tag(361), Tag(76), Tag(109), Tag(12), Tag(13), Tag(153), Tag(154),
499 Tag(119), Tag(120), Tag(155), Tag(156), Tag(159), Tag(160), Tag(136),
500 ],
501 &[AllocationAllocsMiscFees::known_tags()],
502 );
503 &TAGS
504 }
505
506 pub fn raw(&self) -> refix_message::Scope<'a> {
507 self.0
508 }
509
510 #[doc(alias = "AllocAccount")]
512 pub fn alloc_account(&self) -> Result<Option<&'a str>, InvalidValue> {
513 self.0.get_str(Tag(79))
514 }
515
516 #[doc(alias = "AllocPrice")]
518 pub fn alloc_price(&self) -> Result<Option<Decimal>, InvalidValue> {
519 self.0.get_decimal(Tag(366))
520 }
521
522 #[doc(alias = "AllocShares")]
524 pub fn alloc_shares(&self) -> Result<Option<Decimal>, InvalidValue> {
525 self.0.get_decimal(Tag(80))
526 }
527
528 #[doc(alias = "ProcessCode")]
530 pub fn process_code(&self) -> Result<Option<ProcessCode<'a>>, InvalidValue> {
531 Ok(self.0.get_str(Tag(81))?.map(ProcessCode::from_value))
532 }
533
534 #[doc(alias = "BrokerOfCredit")]
536 pub fn broker_of_credit(&self) -> Result<Option<&'a str>, InvalidValue> {
537 self.0.get_str(Tag(92))
538 }
539
540 #[doc(alias = "NotifyBrokerOfCredit")]
542 pub fn notify_broker_of_credit(&self) -> Result<Option<bool>, InvalidValue> {
543 self.0.get_bool(Tag(208))
544 }
545
546 #[doc(alias = "AllocHandlInst")]
548 pub fn alloc_handl_inst(&self) -> Result<Option<AllocHandlInst>, InvalidValue> {
549 Ok(self.0.get_int(Tag(209))?.map(AllocHandlInst::from_value))
550 }
551
552 #[doc(alias = "AllocText")]
554 pub fn alloc_text(&self) -> Result<Option<&'a str>, InvalidValue> {
555 self.0.get_str(Tag(161))
556 }
557
558 #[doc(alias = "EncodedAllocTextLen")]
560 pub fn encoded_alloc_text_len(&self) -> Result<Option<i64>, InvalidValue> {
561 self.0.get_int(Tag(360))
562 }
563
564 #[doc(alias = "EncodedAllocText")]
566 pub fn encoded_alloc_text(&self) -> Option<&'a [u8]> {
567 self.0.get(Tag(361))
568 }
569
570 #[doc(alias = "ExecBroker")]
572 pub fn exec_broker(&self) -> Result<Option<&'a str>, InvalidValue> {
573 self.0.get_str(Tag(76))
574 }
575
576 #[doc(alias = "ClientID")]
578 pub fn client_id(&self) -> Result<Option<&'a str>, InvalidValue> {
579 self.0.get_str(Tag(109))
580 }
581
582 #[doc(alias = "Commission")]
584 pub fn commission(&self) -> Result<Option<Decimal>, InvalidValue> {
585 self.0.get_decimal(Tag(12))
586 }
587
588 #[doc(alias = "CommType")]
590 pub fn comm_type(&self) -> Result<Option<CommType<'a>>, InvalidValue> {
591 Ok(self.0.get_str(Tag(13))?.map(CommType::from_value))
592 }
593
594 #[doc(alias = "AllocAvgPx")]
596 pub fn alloc_avg_px(&self) -> Result<Option<Decimal>, InvalidValue> {
597 self.0.get_decimal(Tag(153))
598 }
599
600 #[doc(alias = "AllocNetMoney")]
602 pub fn alloc_net_money(&self) -> Result<Option<Decimal>, InvalidValue> {
603 self.0.get_decimal(Tag(154))
604 }
605
606 #[doc(alias = "SettlCurrAmt")]
608 pub fn settl_curr_amt(&self) -> Result<Option<Decimal>, InvalidValue> {
609 self.0.get_decimal(Tag(119))
610 }
611
612 #[doc(alias = "SettlCurrency")]
614 pub fn settl_currency(&self) -> Result<Option<&'a str>, InvalidValue> {
615 self.0.get_str(Tag(120))
616 }
617
618 #[doc(alias = "SettlCurrFxRate")]
620 pub fn settl_curr_fx_rate(&self) -> Result<Option<Decimal>, InvalidValue> {
621 self.0.get_decimal(Tag(155))
622 }
623
624 #[doc(alias = "SettlCurrFxRateCalc")]
626 pub fn settl_curr_fx_rate_calc(&self) -> Result<Option<&'a str>, InvalidValue> {
627 self.0.get_str(Tag(156))
628 }
629
630 #[doc(alias = "AccruedInterestAmt")]
632 pub fn accrued_interest_amt(&self) -> Result<Option<Decimal>, InvalidValue> {
633 self.0.get_decimal(Tag(159))
634 }
635
636 #[doc(alias = "SettlInstMode")]
638 pub fn settl_inst_mode(&self) -> Result<Option<SettlInstMode<'a>>, InvalidValue> {
639 Ok(self.0.get_str(Tag(160))?.map(SettlInstMode::from_value))
640 }
641
642 #[doc(alias = "NoMiscFees")]
644 pub fn misc_fees(&self) -> Result<Instances<'a, AllocationAllocsMiscFees<'a>>, InvalidValue> {
645 self.0.get_group(&AllocationAllocsMiscFees::TABLE, &Self::known_tags().get()).map(Instances::from)
646 }
647}
648
649impl std::fmt::Debug for AllocationAllocs<'_> {
650 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
651 write!(f, "AllocationAllocs({})", self.0)
652 }
653}
654
655#[derive(Clone, Copy)]
657pub struct AllocationAllocsMiscFees<'a>(refix_message::Scope<'a>);
658
659impl<'a> From<refix_message::Scope<'a>> for AllocationAllocsMiscFees<'a> {
660 fn from(scope: refix_message::Scope<'a>) -> Self {
661 Self(scope)
662 }
663}
664
665impl<'a> AllocationAllocsMiscFees<'a> {
666 pub(in super::super) const TABLE: GroupTable<'static> = GroupTable::new(
667 Tag(136),
668 Tag(137),
669 &[Tag(137), Tag(138), Tag(139)],
670 &[],
671 );
672
673 pub(in super::super) const fn known_tags() -> &'static LazyKnownTags {
674 static TAGS: LazyKnownTags = LazyKnownTags::new(&[Tag(137), Tag(138), Tag(139)], &[]);
675 &TAGS
676 }
677
678 pub fn raw(&self) -> refix_message::Scope<'a> {
679 self.0
680 }
681
682 #[doc(alias = "MiscFeeAmt")]
684 pub fn misc_fee_amt(&self) -> Result<Option<Decimal>, InvalidValue> {
685 self.0.get_decimal(Tag(137))
686 }
687
688 #[doc(alias = "MiscFeeCurr")]
690 pub fn misc_fee_curr(&self) -> Result<Option<&'a str>, InvalidValue> {
691 self.0.get_str(Tag(138))
692 }
693
694 #[doc(alias = "MiscFeeType")]
696 pub fn misc_fee_type(&self) -> Result<Option<MiscFeeType<'a>>, InvalidValue> {
697 Ok(self.0.get_str(Tag(139))?.map(MiscFeeType::from_value))
698 }
699}
700
701impl std::fmt::Debug for AllocationAllocsMiscFees<'_> {
702 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
703 write!(f, "AllocationAllocsMiscFees({})", self.0)
704 }
705}