quickfix-tokio 0.2.0

A pure-Rust FIX protocol engine built natively on tokio
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
//! GENERATED by `generate-fix` — do not edit by hand.
#![allow(clippy::all, unused_imports, unused_mut, dead_code, non_upper_case_globals)]

//! Typed field markers: `fields::ClOrdID::TAG` etc, with enum value
//! constants attached (`fields::Side::BUY`).

use crate::field_map::Field;
use crate::message::Tag;

/// BeginSeqNo (7).
pub struct BeginSeqNo;
impl Field for BeginSeqNo { const TAG: Tag = 7; type Value = i64; }

/// BeginString (8).
pub struct BeginString;
impl Field for BeginString { const TAG: Tag = 8; type Value = String; }

/// BodyLength (9).
pub struct BodyLength;
impl Field for BodyLength { const TAG: Tag = 9; type Value = i64; }

/// CheckSum (10).
pub struct CheckSum;
impl Field for CheckSum { const TAG: Tag = 10; type Value = String; }

/// EndSeqNo (16).
pub struct EndSeqNo;
impl Field for EndSeqNo { const TAG: Tag = 16; type Value = i64; }

/// MsgSeqNum (34).
pub struct MsgSeqNum;
impl Field for MsgSeqNum { const TAG: Tag = 34; type Value = i64; }

/// MsgType (35).
pub struct MsgType;
impl Field for MsgType { const TAG: Tag = 35; type Value = String; }
impl MsgType {
    pub const HEARTBEAT: &'static str = "0";
    pub const TEST_REQUEST: &'static str = "1";
    pub const RESEND_REQUEST: &'static str = "2";
    pub const REJECT: &'static str = "3";
    pub const SEQUENCE_RESET: &'static str = "4";
    pub const LOGOUT: &'static str = "5";
    pub const INDICATION_OF_INTEREST: &'static str = "6";
    pub const ADVERTISEMENT: &'static str = "7";
    pub const EXECUTION_REPORT: &'static str = "8";
    pub const ORDER_CANCEL_REJECT: &'static str = "9";
    pub const LOGON: &'static str = "A";
    pub const NEWS: &'static str = "B";
    pub const EMAIL: &'static str = "C";
    pub const ORDER_SINGLE: &'static str = "D";
    pub const ORDER_LIST: &'static str = "E";
    pub const ORDER_CANCEL_REQUEST: &'static str = "F";
    pub const ORDER_CANCEL_REPLACE_REQUEST: &'static str = "G";
    pub const ORDER_STATUS_REQUEST: &'static str = "H";
    pub const ALLOCATION_INSTRUCTION: &'static str = "J";
    pub const LIST_CANCEL_REQUEST: &'static str = "K";
    pub const LIST_EXECUTE: &'static str = "L";
    pub const LIST_STATUS_REQUEST: &'static str = "M";
    pub const LIST_STATUS: &'static str = "N";
    pub const ALLOCATION_INSTRUCTION_ACK: &'static str = "P";
    pub const DONT_KNOW_TRADE: &'static str = "Q";
    pub const QUOTE_REQUEST: &'static str = "R";
    pub const QUOTE: &'static str = "S";
    pub const SETTLEMENT_INSTRUCTIONS: &'static str = "T";
    pub const MARKET_DATA_REQUEST: &'static str = "V";
    pub const MARKET_DATA_SNAPSHOT_FULL_REFRESH: &'static str = "W";
    pub const MARKET_DATA_INCREMENTAL_REFRESH: &'static str = "X";
    pub const MARKET_DATA_REQUEST_REJECT: &'static str = "Y";
    pub const QUOTE_CANCEL: &'static str = "Z";
    pub const QUOTE_STATUS_REQUEST: &'static str = "a";
    pub const MASS_QUOTE_ACKNOWLEDGEMENT: &'static str = "b";
    pub const SECURITY_DEFINITION_REQUEST: &'static str = "c";
    pub const SECURITY_DEFINITION: &'static str = "d";
    pub const SECURITY_STATUS_REQUEST: &'static str = "e";
    pub const SECURITY_STATUS: &'static str = "f";
    pub const TRADING_SESSION_STATUS_REQUEST: &'static str = "g";
    pub const TRADING_SESSION_STATUS: &'static str = "h";
    pub const MASS_QUOTE: &'static str = "i";
    pub const BUSINESS_MESSAGE_REJECT: &'static str = "j";
    pub const BID_REQUEST: &'static str = "k";
    pub const BID_RESPONSE: &'static str = "l";
    pub const LIST_STRIKE_PRICE: &'static str = "m";
    pub const XML_MESSAGE: &'static str = "n";
    pub const REGISTRATION_INSTRUCTIONS: &'static str = "o";
    pub const REGISTRATION_INSTRUCTIONS_RESPONSE: &'static str = "p";
    pub const ORDER_MASS_CANCEL_REQUEST: &'static str = "q";
    pub const ORDER_MASS_CANCEL_REPORT: &'static str = "r";
    pub const NEW_ORDER_CROSS: &'static str = "s";
    pub const CROSS_ORDER_CANCEL_REPLACE_REQUEST: &'static str = "t";
    pub const CROSS_ORDER_CANCEL_REQUEST: &'static str = "u";
    pub const SECURITY_TYPE_REQUEST: &'static str = "v";
    pub const SECURITY_TYPES: &'static str = "w";
    pub const SECURITY_LIST_REQUEST: &'static str = "x";
    pub const SECURITY_LIST: &'static str = "y";
    pub const DERIVATIVE_SECURITY_LIST_REQUEST: &'static str = "z";
    pub const DERIVATIVE_SECURITY_LIST: &'static str = "AA";
    pub const NEW_ORDER_MULTILEG: &'static str = "AB";
    pub const MULTILEG_ORDER_CANCEL_REPLACE: &'static str = "AC";
    pub const TRADE_CAPTURE_REPORT_REQUEST: &'static str = "AD";
    pub const TRADE_CAPTURE_REPORT: &'static str = "AE";
    pub const ORDER_MASS_STATUS_REQUEST: &'static str = "AF";
    pub const QUOTE_REQUEST_REJECT: &'static str = "AG";
    pub const RFQ_REQUEST: &'static str = "AH";
    pub const QUOTE_STATUS_REPORT: &'static str = "AI";
    pub const QUOTE_RESPONSE: &'static str = "AJ";
    pub const CONFIRMATION: &'static str = "AK";
    pub const POSITION_MAINTENANCE_REQUEST: &'static str = "AL";
    pub const POSITION_MAINTENANCE_REPORT: &'static str = "AM";
    pub const REQUEST_FOR_POSITIONS: &'static str = "AN";
    pub const REQUEST_FOR_POSITIONS_ACK: &'static str = "AO";
    pub const POSITION_REPORT: &'static str = "AP";
    pub const TRADE_CAPTURE_REPORT_REQUEST_ACK: &'static str = "AQ";
    pub const TRADE_CAPTURE_REPORT_ACK: &'static str = "AR";
    pub const ALLOCATION_REPORT: &'static str = "AS";
    pub const ALLOCATION_REPORT_ACK: &'static str = "AT";
    pub const CONFIRMATION_ACK: &'static str = "AU";
    pub const SETTLEMENT_INSTRUCTION_REQUEST: &'static str = "AV";
    pub const ASSIGNMENT_REPORT: &'static str = "AW";
    pub const COLLATERAL_REQUEST: &'static str = "AX";
    pub const COLLATERAL_ASSIGNMENT: &'static str = "AY";
    pub const COLLATERAL_RESPONSE: &'static str = "AZ";
    pub const COLLATERAL_REPORT: &'static str = "BA";
    pub const COLLATERAL_INQUIRY: &'static str = "BB";
    pub const NETWORK_STATUS_REQUEST: &'static str = "BC";
    pub const NETWORK_STATUS_RESPONSE: &'static str = "BD";
    pub const USER_REQUEST: &'static str = "BE";
    pub const USER_RESPONSE: &'static str = "BF";
    pub const COLLATERAL_INQUIRY_ACK: &'static str = "BG";
    pub const CONFIRMATION_REQUEST: &'static str = "BH";
    pub const TRADING_SESSION_LIST_REQUEST: &'static str = "BI";
    pub const TRADING_SESSION_LIST: &'static str = "BJ";
    pub const SECURITY_LIST_UPDATE_REPORT: &'static str = "BK";
    pub const ADJUSTED_POSITION_REPORT: &'static str = "BL";
    pub const ALLOCATION_INSTRUCTION_ALERT: &'static str = "BM";
    pub const EXECUTION_ACKNOWLEDGEMENT: &'static str = "BN";
    pub const CONTRARY_INTENTION_REPORT: &'static str = "BO";
    pub const SECURITY_DEFINITION_UPDATE_REPORT: &'static str = "BP";
}

/// NewSeqNo (36).
pub struct NewSeqNo;
impl Field for NewSeqNo { const TAG: Tag = 36; type Value = i64; }

/// PossDupFlag (43).
pub struct PossDupFlag;
impl Field for PossDupFlag { const TAG: Tag = 43; type Value = bool; }

/// RefSeqNum (45).
pub struct RefSeqNum;
impl Field for RefSeqNum { const TAG: Tag = 45; type Value = i64; }

/// SenderCompID (49).
pub struct SenderCompID;
impl Field for SenderCompID { const TAG: Tag = 49; type Value = String; }

/// SenderSubID (50).
pub struct SenderSubID;
impl Field for SenderSubID { const TAG: Tag = 50; type Value = String; }

/// SendingTime (52).
pub struct SendingTime;
impl Field for SendingTime { const TAG: Tag = 52; type Value = crate::UtcTimestamp; }

/// TargetCompID (56).
pub struct TargetCompID;
impl Field for TargetCompID { const TAG: Tag = 56; type Value = String; }

/// TargetSubID (57).
pub struct TargetSubID;
impl Field for TargetSubID { const TAG: Tag = 57; type Value = String; }

/// Text (58).
pub struct Text;
impl Field for Text { const TAG: Tag = 58; type Value = String; }

/// Signature (89).
pub struct Signature;
impl Field for Signature { const TAG: Tag = 89; type Value = Vec<u8>; }

/// SecureDataLen (90).
pub struct SecureDataLen;
impl Field for SecureDataLen { const TAG: Tag = 90; type Value = i64; }

/// SecureData (91).
pub struct SecureData;
impl Field for SecureData { const TAG: Tag = 91; type Value = Vec<u8>; }

/// SignatureLength (93).
pub struct SignatureLength;
impl Field for SignatureLength { const TAG: Tag = 93; type Value = i64; }

/// RawDataLength (95).
pub struct RawDataLength;
impl Field for RawDataLength { const TAG: Tag = 95; type Value = i64; }

/// RawData (96).
pub struct RawData;
impl Field for RawData { const TAG: Tag = 96; type Value = Vec<u8>; }

/// PossResend (97).
pub struct PossResend;
impl Field for PossResend { const TAG: Tag = 97; type Value = bool; }

/// EncryptMethod (98).
pub struct EncryptMethod;
impl Field for EncryptMethod { const TAG: Tag = 98; type Value = i64; }
impl EncryptMethod {
    pub const NONE_OTHER: i64 = 0;
    pub const PKCS: i64 = 1;
    pub const DES: i64 = 2;
    pub const PKCS_DES: i64 = 3;
    pub const PGP_DES: i64 = 4;
    pub const PGP_DES_MD5: i64 = 5;
    pub const PEM_DES_MD5: i64 = 6;
}

/// HeartBtInt (108).
pub struct HeartBtInt;
impl Field for HeartBtInt { const TAG: Tag = 108; type Value = i64; }

/// TestReqID (112).
pub struct TestReqID;
impl Field for TestReqID { const TAG: Tag = 112; type Value = String; }

/// OnBehalfOfCompID (115).
pub struct OnBehalfOfCompID;
impl Field for OnBehalfOfCompID { const TAG: Tag = 115; type Value = String; }

/// OnBehalfOfSubID (116).
pub struct OnBehalfOfSubID;
impl Field for OnBehalfOfSubID { const TAG: Tag = 116; type Value = String; }

/// OrigSendingTime (122).
pub struct OrigSendingTime;
impl Field for OrigSendingTime { const TAG: Tag = 122; type Value = crate::UtcTimestamp; }

/// GapFillFlag (123).
pub struct GapFillFlag;
impl Field for GapFillFlag { const TAG: Tag = 123; type Value = bool; }

/// DeliverToCompID (128).
pub struct DeliverToCompID;
impl Field for DeliverToCompID { const TAG: Tag = 128; type Value = String; }

/// DeliverToSubID (129).
pub struct DeliverToSubID;
impl Field for DeliverToSubID { const TAG: Tag = 129; type Value = String; }

/// ResetSeqNumFlag (141).
pub struct ResetSeqNumFlag;
impl Field for ResetSeqNumFlag { const TAG: Tag = 141; type Value = bool; }

/// SenderLocationID (142).
pub struct SenderLocationID;
impl Field for SenderLocationID { const TAG: Tag = 142; type Value = String; }

/// TargetLocationID (143).
pub struct TargetLocationID;
impl Field for TargetLocationID { const TAG: Tag = 143; type Value = String; }

/// OnBehalfOfLocationID (144).
pub struct OnBehalfOfLocationID;
impl Field for OnBehalfOfLocationID { const TAG: Tag = 144; type Value = String; }

/// DeliverToLocationID (145).
pub struct DeliverToLocationID;
impl Field for DeliverToLocationID { const TAG: Tag = 145; type Value = String; }

/// XmlDataLen (212).
pub struct XmlDataLen;
impl Field for XmlDataLen { const TAG: Tag = 212; type Value = i64; }

/// XmlData (213).
pub struct XmlData;
impl Field for XmlData { const TAG: Tag = 213; type Value = Vec<u8>; }

/// MessageEncoding (347).
pub struct MessageEncoding;
impl Field for MessageEncoding { const TAG: Tag = 347; type Value = String; }
impl MessageEncoding {
    pub const ISO_2022_JP: &'static str = "ISO-2022-JP";
    pub const EUC_JP: &'static str = "EUC-JP";
    pub const SHIFT_JIS: &'static str = "SHIFT_JIS";
    pub const UTF_8: &'static str = "UTF-8";
}

/// EncodedTextLen (354).
pub struct EncodedTextLen;
impl Field for EncodedTextLen { const TAG: Tag = 354; type Value = i64; }

/// EncodedText (355).
pub struct EncodedText;
impl Field for EncodedText { const TAG: Tag = 355; type Value = Vec<u8>; }

/// LastMsgSeqNumProcessed (369).
pub struct LastMsgSeqNumProcessed;
impl Field for LastMsgSeqNumProcessed { const TAG: Tag = 369; type Value = i64; }

/// RefTagID (371).
pub struct RefTagID;
impl Field for RefTagID { const TAG: Tag = 371; type Value = i64; }

/// RefMsgType (372).
pub struct RefMsgType;
impl Field for RefMsgType { const TAG: Tag = 372; type Value = String; }

/// SessionRejectReason (373).
pub struct SessionRejectReason;
impl Field for SessionRejectReason { const TAG: Tag = 373; type Value = i64; }
impl SessionRejectReason {
    pub const INVALID_TAG_NUMBER: i64 = 0;
    pub const REQUIRED_TAG_MISSING: i64 = 1;
    pub const SENDINGTIME_ACCURACY_PROBLEM: i64 = 10;
    pub const INVALID_MSGTYPE: i64 = 11;
    pub const XML_VALIDATION_ERROR: i64 = 12;
    pub const TAG_APPEARS_MORE_THAN_ONCE: i64 = 13;
    pub const TAG_SPECIFIED_OUT_OF_REQUIRED_ORDER: i64 = 14;
    pub const REPEATING_GROUP_FIELDS_OUT_OF_ORDER: i64 = 15;
    pub const INCORRECT_NUMINGROUP_COUNT_FOR_REPEATING_GROUP: i64 = 16;
    pub const NON_DATA_VALUE_INCLUDES_FIELD_DELIMITER: i64 = 17;
    pub const TAG_NOT_DEFINED_FOR_THIS_MESSAGE_TYPE: i64 = 2;
    pub const UNDEFINED_TAG: i64 = 3;
    pub const TAG_SPECIFIED_WITHOUT_A_VALUE: i64 = 4;
    pub const VALUE_IS_INCORRECT: i64 = 5;
    pub const INCORRECT_DATA_FORMAT_FOR_VALUE: i64 = 6;
    pub const DECRYPTION_PROBLEM: i64 = 7;
    pub const SIGNATURE_PROBLEM: i64 = 8;
    pub const COMPID_PROBLEM: i64 = 9;
    pub const OTHER: i64 = 99;
}

/// MaxMessageSize (383).
pub struct MaxMessageSize;
impl Field for MaxMessageSize { const TAG: Tag = 383; type Value = i64; }

/// NoMsgTypes (384).
pub struct NoMsgTypes;
impl Field for NoMsgTypes { const TAG: Tag = 384; type Value = i64; }

/// MsgDirection (385).
pub struct MsgDirection;
impl Field for MsgDirection { const TAG: Tag = 385; type Value = char; }
impl MsgDirection {
    pub const RECEIVE: char = 'R';
    pub const SEND: char = 'S';
}

/// TestMessageIndicator (464).
pub struct TestMessageIndicator;
impl Field for TestMessageIndicator { const TAG: Tag = 464; type Value = bool; }

/// Username (553).
pub struct Username;
impl Field for Username { const TAG: Tag = 553; type Value = String; }

/// Password (554).
pub struct Password;
impl Field for Password { const TAG: Tag = 554; type Value = String; }

/// NoHops (627).
pub struct NoHops;
impl Field for NoHops { const TAG: Tag = 627; type Value = i64; }

/// HopCompID (628).
pub struct HopCompID;
impl Field for HopCompID { const TAG: Tag = 628; type Value = String; }

/// HopSendingTime (629).
pub struct HopSendingTime;
impl Field for HopSendingTime { const TAG: Tag = 629; type Value = crate::UtcTimestamp; }

/// HopRefID (630).
pub struct HopRefID;
impl Field for HopRefID { const TAG: Tag = 630; type Value = i64; }

/// NextExpectedMsgSeqNum (789).
pub struct NextExpectedMsgSeqNum;
impl Field for NextExpectedMsgSeqNum { const TAG: Tag = 789; type Value = i64; }

/// ApplVerID (1128).
pub struct ApplVerID;
impl Field for ApplVerID { const TAG: Tag = 1128; type Value = String; }
impl ApplVerID {
    pub const FIX27: &'static str = "0";
    pub const FIX30: &'static str = "1";
    pub const FIX40: &'static str = "2";
    pub const FIX41: &'static str = "3";
    pub const FIX42: &'static str = "4";
    pub const FIX43: &'static str = "5";
    pub const FIX44: &'static str = "6";
    pub const FIX50: &'static str = "7";
    pub const FIX50SP1: &'static str = "8";
    pub const FIX50SP2: &'static str = "9";
}

/// CstmApplVerID (1129).
pub struct CstmApplVerID;
impl Field for CstmApplVerID { const TAG: Tag = 1129; type Value = String; }

/// RefApplVerID (1130).
pub struct RefApplVerID;
impl Field for RefApplVerID { const TAG: Tag = 1130; type Value = String; }

/// RefCstmApplVerID (1131).
pub struct RefCstmApplVerID;
impl Field for RefCstmApplVerID { const TAG: Tag = 1131; type Value = String; }

/// DefaultApplVerID (1137).
pub struct DefaultApplVerID;
impl Field for DefaultApplVerID { const TAG: Tag = 1137; type Value = String; }