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
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
// This file is autogenerated. Do not edit.
// To make changes to this file, edit codegen.rb and/or codegen.erb and run make


#[allow(unused_imports)]
#[allow(missing_copy_implementations)]
pub mod connection {
    use bit_vec::BitVec;
    use table::{Table, decode_table, encode_table};
    use framing::{ContentHeaderFrame, MethodFrame};
    use error::*;
    use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
    use std::io::{Read, Write};
    use codegen_macros::{ArgumentsReader, ArgumentsWriter};
    use method;


    // Method 10:start
    method_struct!(Start, "connection.start", 10, 10,
        version_major => octet,
version_minor => octet,
server_properties => table,
mechanisms => longstr,
locales => longstr
    );

    unsafe impl Send for Start {}
    // Method 11:start-ok
    method_struct!(StartOk, "connection.start-ok", 10, 11,
        client_properties => table,
mechanism => shortstr,
response => longstr,
locale => shortstr
    );

    unsafe impl Send for StartOk {}
    // Method 20:secure
    method_struct!(Secure, "connection.secure", 10, 20,
        challenge => longstr
    );

    unsafe impl Send for Secure {}
    // Method 21:secure-ok
    method_struct!(SecureOk, "connection.secure-ok", 10, 21,
        response => longstr
    );

    unsafe impl Send for SecureOk {}
    // Method 30:tune
    method_struct!(Tune, "connection.tune", 10, 30,
        channel_max => short,
frame_max => long,
heartbeat => short
    );

    unsafe impl Send for Tune {}
    // Method 31:tune-ok
    method_struct!(TuneOk, "connection.tune-ok", 10, 31,
        channel_max => short,
frame_max => long,
heartbeat => short
    );

    unsafe impl Send for TuneOk {}
    // Method 40:open
    method_struct!(Open, "connection.open", 10, 40,
        virtual_host => shortstr,
capabilities => shortstr,
insist => bit
    );

    unsafe impl Send for Open {}
    // Method 41:open-ok
    method_struct!(OpenOk, "connection.open-ok", 10, 41,
        known_hosts => shortstr
    );

    unsafe impl Send for OpenOk {}
    // Method 50:close
    method_struct!(Close, "connection.close", 10, 50,
        reply_code => short,
reply_text => shortstr,
class_id => short,
method_id => short
    );

    unsafe impl Send for Close {}
    // Method 51:close-ok
    method_struct!(CloseOk, "connection.close-ok", 10, 51,
        
    );

    unsafe impl Send for CloseOk {}
    // Method 60:blocked
    method_struct!(Blocked, "connection.blocked", 10, 60,
        reason => shortstr
    );

    unsafe impl Send for Blocked {}
    // Method 61:unblocked
    method_struct!(Unblocked, "connection.unblocked", 10, 61,
        
    );

    unsafe impl Send for Unblocked {}
}

#[allow(unused_imports)]
#[allow(missing_copy_implementations)]
pub mod channel {
    use bit_vec::BitVec;
    use table::{Table, decode_table, encode_table};
    use framing::{ContentHeaderFrame, MethodFrame};
    use error::*;
    use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
    use std::io::{Read, Write};
    use codegen_macros::{ArgumentsReader, ArgumentsWriter};
    use method;


    // Method 10:open
    method_struct!(Open, "channel.open", 20, 10,
        out_of_band => shortstr
    );

    unsafe impl Send for Open {}
    // Method 11:open-ok
    method_struct!(OpenOk, "channel.open-ok", 20, 11,
        channel_id => longstr
    );

    unsafe impl Send for OpenOk {}
    // Method 20:flow
    method_struct!(Flow, "channel.flow", 20, 20,
        active => bit
    );

    unsafe impl Send for Flow {}
    // Method 21:flow-ok
    method_struct!(FlowOk, "channel.flow-ok", 20, 21,
        active => bit
    );

    unsafe impl Send for FlowOk {}
    // Method 40:close
    method_struct!(Close, "channel.close", 20, 40,
        reply_code => short,
reply_text => shortstr,
class_id => short,
method_id => short
    );

    unsafe impl Send for Close {}
    // Method 41:close-ok
    method_struct!(CloseOk, "channel.close-ok", 20, 41,
        
    );

    unsafe impl Send for CloseOk {}
}

#[allow(unused_imports)]
#[allow(missing_copy_implementations)]
pub mod access {
    use bit_vec::BitVec;
    use table::{Table, decode_table, encode_table};
    use framing::{ContentHeaderFrame, MethodFrame};
    use error::*;
    use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
    use std::io::{Read, Write};
    use codegen_macros::{ArgumentsReader, ArgumentsWriter};
    use method;


    // Method 10:request
    method_struct!(Request, "access.request", 30, 10,
        realm => shortstr,
exclusive => bit,
passive => bit,
active => bit,
write => bit,
read => bit
    );

    unsafe impl Send for Request {}
    // Method 11:request-ok
    method_struct!(RequestOk, "access.request-ok", 30, 11,
        ticket => short
    );

    unsafe impl Send for RequestOk {}
}

#[allow(unused_imports)]
#[allow(missing_copy_implementations)]
pub mod exchange {
    use bit_vec::BitVec;
    use table::{Table, decode_table, encode_table};
    use framing::{ContentHeaderFrame, MethodFrame};
    use error::*;
    use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
    use std::io::{Read, Write};
    use codegen_macros::{ArgumentsReader, ArgumentsWriter};
    use method;


    // Method 10:declare
    method_struct!(Declare, "exchange.declare", 40, 10,
        ticket => short,
exchange => shortstr,
_type => shortstr,
passive => bit,
durable => bit,
auto_delete => bit,
internal => bit,
nowait => bit,
arguments => table
    );

    unsafe impl Send for Declare {}
    // Method 11:declare-ok
    method_struct!(DeclareOk, "exchange.declare-ok", 40, 11,
        
    );

    unsafe impl Send for DeclareOk {}
    // Method 20:delete
    method_struct!(Delete, "exchange.delete", 40, 20,
        ticket => short,
exchange => shortstr,
if_unused => bit,
nowait => bit
    );

    unsafe impl Send for Delete {}
    // Method 21:delete-ok
    method_struct!(DeleteOk, "exchange.delete-ok", 40, 21,
        
    );

    unsafe impl Send for DeleteOk {}
    // Method 30:bind
    method_struct!(Bind, "exchange.bind", 40, 30,
        ticket => short,
destination => shortstr,
source => shortstr,
routing_key => shortstr,
nowait => bit,
arguments => table
    );

    unsafe impl Send for Bind {}
    // Method 31:bind-ok
    method_struct!(BindOk, "exchange.bind-ok", 40, 31,
        
    );

    unsafe impl Send for BindOk {}
    // Method 40:unbind
    method_struct!(Unbind, "exchange.unbind", 40, 40,
        ticket => short,
destination => shortstr,
source => shortstr,
routing_key => shortstr,
nowait => bit,
arguments => table
    );

    unsafe impl Send for Unbind {}
    // Method 51:unbind-ok
    method_struct!(UnbindOk, "exchange.unbind-ok", 40, 51,
        
    );

    unsafe impl Send for UnbindOk {}
}

#[allow(unused_imports)]
#[allow(missing_copy_implementations)]
pub mod queue {
    use bit_vec::BitVec;
    use table::{Table, decode_table, encode_table};
    use framing::{ContentHeaderFrame, MethodFrame};
    use error::*;
    use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
    use std::io::{Read, Write};
    use codegen_macros::{ArgumentsReader, ArgumentsWriter};
    use method;


    // Method 10:declare
    method_struct!(Declare, "queue.declare", 50, 10,
        ticket => short,
queue => shortstr,
passive => bit,
durable => bit,
exclusive => bit,
auto_delete => bit,
nowait => bit,
arguments => table
    );

    unsafe impl Send for Declare {}
    // Method 11:declare-ok
    method_struct!(DeclareOk, "queue.declare-ok", 50, 11,
        queue => shortstr,
message_count => long,
consumer_count => long
    );

    unsafe impl Send for DeclareOk {}
    // Method 20:bind
    method_struct!(Bind, "queue.bind", 50, 20,
        ticket => short,
queue => shortstr,
exchange => shortstr,
routing_key => shortstr,
nowait => bit,
arguments => table
    );

    unsafe impl Send for Bind {}
    // Method 21:bind-ok
    method_struct!(BindOk, "queue.bind-ok", 50, 21,
        
    );

    unsafe impl Send for BindOk {}
    // Method 30:purge
    method_struct!(Purge, "queue.purge", 50, 30,
        ticket => short,
queue => shortstr,
nowait => bit
    );

    unsafe impl Send for Purge {}
    // Method 31:purge-ok
    method_struct!(PurgeOk, "queue.purge-ok", 50, 31,
        message_count => long
    );

    unsafe impl Send for PurgeOk {}
    // Method 40:delete
    method_struct!(Delete, "queue.delete", 50, 40,
        ticket => short,
queue => shortstr,
if_unused => bit,
if_empty => bit,
nowait => bit
    );

    unsafe impl Send for Delete {}
    // Method 41:delete-ok
    method_struct!(DeleteOk, "queue.delete-ok", 50, 41,
        message_count => long
    );

    unsafe impl Send for DeleteOk {}
    // Method 50:unbind
    method_struct!(Unbind, "queue.unbind", 50, 50,
        ticket => short,
queue => shortstr,
exchange => shortstr,
routing_key => shortstr,
arguments => table
    );

    unsafe impl Send for Unbind {}
    // Method 51:unbind-ok
    method_struct!(UnbindOk, "queue.unbind-ok", 50, 51,
        
    );

    unsafe impl Send for UnbindOk {}
}

#[allow(unused_imports)]
#[allow(missing_copy_implementations)]
pub mod basic {
    use bit_vec::BitVec;
    use table::{Table, decode_table, encode_table};
    use framing::{ContentHeaderFrame, MethodFrame};
    use error::*;
    use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
    use std::io::{Read, Write};
    use codegen_macros::{ArgumentsReader, ArgumentsWriter};
    use method;

    // properties struct for basic
    properties_struct!(BasicProperties,
      content_type => shortstr,
content_encoding => shortstr,
headers => table,
delivery_mode => octet,
priority => octet,
correlation_id => shortstr,
reply_to => shortstr,
expiration => shortstr,
message_id => shortstr,
timestamp => timestamp,
_type => shortstr,
user_id => shortstr,
app_id => shortstr,
cluster_id => shortstr
    );

    // Method 10:qos
    method_struct!(Qos, "basic.qos", 60, 10,
        prefetch_size => long,
prefetch_count => short,
global => bit
    );

    unsafe impl Send for Qos {}
    // Method 11:qos-ok
    method_struct!(QosOk, "basic.qos-ok", 60, 11,
        
    );

    unsafe impl Send for QosOk {}
    // Method 20:consume
    method_struct!(Consume, "basic.consume", 60, 20,
        ticket => short,
queue => shortstr,
consumer_tag => shortstr,
no_local => bit,
no_ack => bit,
exclusive => bit,
nowait => bit,
arguments => table
    );

    unsafe impl Send for Consume {}
    // Method 21:consume-ok
    method_struct!(ConsumeOk, "basic.consume-ok", 60, 21,
        consumer_tag => shortstr
    );

    unsafe impl Send for ConsumeOk {}
    // Method 30:cancel
    method_struct!(Cancel, "basic.cancel", 60, 30,
        consumer_tag => shortstr,
nowait => bit
    );

    unsafe impl Send for Cancel {}
    // Method 31:cancel-ok
    method_struct!(CancelOk, "basic.cancel-ok", 60, 31,
        consumer_tag => shortstr
    );

    unsafe impl Send for CancelOk {}
    // Method 40:publish
    method_struct!(Publish, "basic.publish", 60, 40,
        ticket => short,
exchange => shortstr,
routing_key => shortstr,
mandatory => bit,
immediate => bit
    );

    unsafe impl Send for Publish {}
    // Method 50:return
    method_struct!(Return, "basic.return", 60, 50,
        reply_code => short,
reply_text => shortstr,
exchange => shortstr,
routing_key => shortstr
    );

    unsafe impl Send for Return {}
    // Method 60:deliver
    method_struct!(Deliver, "basic.deliver", 60, 60,
        consumer_tag => shortstr,
delivery_tag => longlong,
redelivered => bit,
exchange => shortstr,
routing_key => shortstr
    );

    unsafe impl Send for Deliver {}
    // Method 70:get
    method_struct!(Get, "basic.get", 60, 70,
        ticket => short,
queue => shortstr,
no_ack => bit
    );

    unsafe impl Send for Get {}
    // Method 71:get-ok
    method_struct!(GetOk, "basic.get-ok", 60, 71,
        delivery_tag => longlong,
redelivered => bit,
exchange => shortstr,
routing_key => shortstr,
message_count => long
    );

    unsafe impl Send for GetOk {}
    // Method 72:get-empty
    method_struct!(GetEmpty, "basic.get-empty", 60, 72,
        cluster_id => shortstr
    );

    unsafe impl Send for GetEmpty {}
    // Method 80:ack
    method_struct!(Ack, "basic.ack", 60, 80,
        delivery_tag => longlong,
multiple => bit
    );

    unsafe impl Send for Ack {}
    // Method 90:reject
    method_struct!(Reject, "basic.reject", 60, 90,
        delivery_tag => longlong,
requeue => bit
    );

    unsafe impl Send for Reject {}
    // Method 100:recover-async
    method_struct!(RecoverAsync, "basic.recover-async", 60, 100,
        requeue => bit
    );

    unsafe impl Send for RecoverAsync {}
    // Method 110:recover
    method_struct!(Recover, "basic.recover", 60, 110,
        requeue => bit
    );

    unsafe impl Send for Recover {}
    // Method 111:recover-ok
    method_struct!(RecoverOk, "basic.recover-ok", 60, 111,
        
    );

    unsafe impl Send for RecoverOk {}
    // Method 120:nack
    method_struct!(Nack, "basic.nack", 60, 120,
        delivery_tag => longlong,
multiple => bit,
requeue => bit
    );

    unsafe impl Send for Nack {}
}

#[allow(unused_imports)]
#[allow(missing_copy_implementations)]
pub mod tx {
    use bit_vec::BitVec;
    use table::{Table, decode_table, encode_table};
    use framing::{ContentHeaderFrame, MethodFrame};
    use error::*;
    use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
    use std::io::{Read, Write};
    use codegen_macros::{ArgumentsReader, ArgumentsWriter};
    use method;


    // Method 10:select
    method_struct!(Select, "tx.select", 90, 10,
        
    );

    unsafe impl Send for Select {}
    // Method 11:select-ok
    method_struct!(SelectOk, "tx.select-ok", 90, 11,
        
    );

    unsafe impl Send for SelectOk {}
    // Method 20:commit
    method_struct!(Commit, "tx.commit", 90, 20,
        
    );

    unsafe impl Send for Commit {}
    // Method 21:commit-ok
    method_struct!(CommitOk, "tx.commit-ok", 90, 21,
        
    );

    unsafe impl Send for CommitOk {}
    // Method 30:rollback
    method_struct!(Rollback, "tx.rollback", 90, 30,
        
    );

    unsafe impl Send for Rollback {}
    // Method 31:rollback-ok
    method_struct!(RollbackOk, "tx.rollback-ok", 90, 31,
        
    );

    unsafe impl Send for RollbackOk {}
}

#[allow(unused_imports)]
#[allow(missing_copy_implementations)]
pub mod confirm {
    use bit_vec::BitVec;
    use table::{Table, decode_table, encode_table};
    use framing::{ContentHeaderFrame, MethodFrame};
    use error::*;
    use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
    use std::io::{Read, Write};
    use codegen_macros::{ArgumentsReader, ArgumentsWriter};
    use method;


    // Method 10:select
    method_struct!(Select, "confirm.select", 85, 10,
        nowait => bit
    );

    unsafe impl Send for Select {}
    // Method 11:select-ok
    method_struct!(SelectOk, "confirm.select-ok", 85, 11,
        
    );

    unsafe impl Send for SelectOk {}
}