refix_fix42/generated/messages/
list_cancel_request.rs1#![cfg_attr(rustfmt, rustfmt::skip)]
3
4use refix_message::{InvalidValue, RawMessage, Tag, UtcTimestamp};
5
6use super::super::components::{Header, Trailer};
7
8pub struct ListCancelRequest(RawMessage);
10
11impl ListCancelRequest {
12 pub const MSG_TYPE: &[u8] = b"K";
13
14 pub fn from_raw(raw: RawMessage) -> Self {
15 Self(raw)
16 }
17
18 pub fn raw(&self) -> &RawMessage {
19 &self.0
20 }
21
22 pub fn header(&self) -> Header<'_> {
23 Header(self.0.scope())
24 }
25
26 pub fn trailer(&self) -> Trailer<'_> {
27 Trailer(self.0.scope())
28 }
29
30 #[doc(alias = "ListID")]
32 pub fn list_id(&self) -> Result<Option<&str>, InvalidValue> {
33 self.0.get_str(Tag(66))
34 }
35
36 #[doc(alias = "TransactTime")]
38 pub fn transact_time(&self) -> Result<Option<UtcTimestamp>, InvalidValue> {
39 self.0.get_utc_timestamp(Tag(60))
40 }
41
42 #[doc(alias = "Text")]
44 pub fn text(&self) -> Result<Option<&str>, InvalidValue> {
45 self.0.get_str(Tag(58))
46 }
47
48 #[doc(alias = "EncodedTextLen")]
50 pub fn encoded_text_len(&self) -> Result<Option<i64>, InvalidValue> {
51 self.0.get_int(Tag(354))
52 }
53
54 #[doc(alias = "EncodedText")]
56 pub fn encoded_text(&self) -> Option<&[u8]> {
57 self.0.get(Tag(355))
58 }
59}
60
61impl std::fmt::Debug for ListCancelRequest {
62 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
63 write!(f, "ListCancelRequest({})", self.0)
64 }
65}
66
67impl std::fmt::Display for ListCancelRequest {
68 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
69 std::fmt::Display::fmt(&self.0, f)
70 }
71}