gamqp/amqp091/internal/method
Every AMQP 0-9-1 method, in both directions, with its wire encoding.
Deprecated reserved arguments (tickets, insist, known-hosts…) are
written as zero values and dropped when decoding.
Types
pub type Method {
ConnectionStart(
version_major: Int,
version_minor: Int,
server_properties: List(#(String, table.FieldValue)),
mechanisms: BitArray,
locales: BitArray,
)
ConnectionStartOk(
client_properties: List(#(String, table.FieldValue)),
mechanism: String,
response: BitArray,
locale: String,
)
ConnectionSecure(challenge: BitArray)
ConnectionSecureOk(response: BitArray)
ConnectionTune(
channel_max: Int,
frame_max: Int,
heartbeat: Int,
)
ConnectionTuneOk(
channel_max: Int,
frame_max: Int,
heartbeat: Int,
)
ConnectionOpen(virtual_host: String)
ConnectionOpenOk
ConnectionClose(
reply_code: Int,
reply_text: String,
class_id: Int,
method_id: Int,
)
ConnectionCloseOk
ConnectionBlocked(reason: String)
ConnectionUnblocked
ConnectionUpdateSecret(new_secret: BitArray, reason: String)
ConnectionUpdateSecretOk
ChannelOpen
ChannelOpenOk
ChannelFlow(active: Bool)
ChannelFlowOk(active: Bool)
ChannelClose(
reply_code: Int,
reply_text: String,
class_id: Int,
method_id: Int,
)
ChannelCloseOk
ExchangeDeclare(
exchange: String,
kind: String,
passive: Bool,
durable: Bool,
auto_delete: Bool,
internal: Bool,
nowait: Bool,
arguments: List(#(String, table.FieldValue)),
)
ExchangeDeclareOk
ExchangeDelete(exchange: String, if_unused: Bool, nowait: Bool)
ExchangeDeleteOk
ExchangeBind(
destination: String,
source: String,
routing_key: String,
nowait: Bool,
arguments: List(#(String, table.FieldValue)),
)
ExchangeBindOk
ExchangeUnbind(
destination: String,
source: String,
routing_key: String,
nowait: Bool,
arguments: List(#(String, table.FieldValue)),
)
ExchangeUnbindOk
QueueDeclare(
queue: String,
passive: Bool,
durable: Bool,
exclusive: Bool,
auto_delete: Bool,
nowait: Bool,
arguments: List(#(String, table.FieldValue)),
)
QueueDeclareOk(
queue: String,
message_count: Int,
consumer_count: Int,
)
QueueBind(
queue: String,
exchange: String,
routing_key: String,
nowait: Bool,
arguments: List(#(String, table.FieldValue)),
)
QueueBindOk
QueuePurge(queue: String, nowait: Bool)
QueuePurgeOk(message_count: Int)
QueueDelete(
queue: String,
if_unused: Bool,
if_empty: Bool,
nowait: Bool,
)
QueueDeleteOk(message_count: Int)
QueueUnbind(
queue: String,
exchange: String,
routing_key: String,
arguments: List(#(String, table.FieldValue)),
)
QueueUnbindOk
BasicQos(prefetch_size: Int, prefetch_count: Int, global: Bool)
BasicQosOk
BasicConsume(
queue: String,
consumer_tag: String,
no_local: Bool,
no_ack: Bool,
exclusive: Bool,
nowait: Bool,
arguments: List(#(String, table.FieldValue)),
)
BasicConsumeOk(consumer_tag: String)
BasicCancel(consumer_tag: String, nowait: Bool)
BasicCancelOk(consumer_tag: String)
BasicPublish(
exchange: String,
routing_key: String,
mandatory: Bool,
immediate: Bool,
)
BasicReturn(
reply_code: Int,
reply_text: String,
exchange: String,
routing_key: String,
)
BasicDeliver(
consumer_tag: String,
delivery_tag: Int,
redelivered: Bool,
exchange: String,
routing_key: String,
)
BasicGet(queue: String, no_ack: Bool)
BasicGetOk(
delivery_tag: Int,
redelivered: Bool,
exchange: String,
routing_key: String,
message_count: Int,
)
BasicGetEmpty
BasicAck(delivery_tag: Int, multiple: Bool)
BasicReject(delivery_tag: Int, requeue: Bool)
BasicRecoverAsync(requeue: Bool)
BasicRecover(requeue: Bool)
BasicRecoverOk
BasicNack(delivery_tag: Int, multiple: Bool, requeue: Bool)
ConfirmSelect(nowait: Bool)
ConfirmSelectOk
TxSelect
TxSelectOk
TxCommit
TxCommitOk
TxRollback
TxRollbackOk
}
Constructors
-
ConnectionStart( version_major: Int, version_minor: Int, server_properties: List(#(String, table.FieldValue)), mechanisms: BitArray, locales: BitArray, ) -
ConnectionStartOk( client_properties: List(#(String, table.FieldValue)), mechanism: String, response: BitArray, locale: String, ) -
ConnectionSecure(challenge: BitArray) -
ConnectionSecureOk(response: BitArray) -
ConnectionTune(channel_max: Int, frame_max: Int, heartbeat: Int) -
ConnectionTuneOk( channel_max: Int, frame_max: Int, heartbeat: Int, ) -
ConnectionOpen(virtual_host: String) -
ConnectionOpenOk -
ConnectionClose( reply_code: Int, reply_text: String, class_id: Int, method_id: Int, ) -
ConnectionCloseOk -
ConnectionBlocked(reason: String) -
ConnectionUnblocked -
ConnectionUpdateSecret(new_secret: BitArray, reason: String) -
ConnectionUpdateSecretOk -
ChannelOpen -
ChannelOpenOk -
ChannelFlow(active: Bool) -
ChannelFlowOk(active: Bool) -
ChannelClose( reply_code: Int, reply_text: String, class_id: Int, method_id: Int, ) -
ChannelCloseOk -
ExchangeDeclare( exchange: String, kind: String, passive: Bool, durable: Bool, auto_delete: Bool, internal: Bool, nowait: Bool, arguments: List(#(String, table.FieldValue)), ) -
ExchangeDeclareOk -
ExchangeDelete(exchange: String, if_unused: Bool, nowait: Bool) -
ExchangeDeleteOk -
ExchangeBind( destination: String, source: String, routing_key: String, nowait: Bool, arguments: List(#(String, table.FieldValue)), ) -
ExchangeBindOk -
ExchangeUnbind( destination: String, source: String, routing_key: String, nowait: Bool, arguments: List(#(String, table.FieldValue)), ) -
ExchangeUnbindOk -
QueueDeclare( queue: String, passive: Bool, durable: Bool, exclusive: Bool, auto_delete: Bool, nowait: Bool, arguments: List(#(String, table.FieldValue)), ) -
QueueDeclareOk( queue: String, message_count: Int, consumer_count: Int, ) -
QueueBind( queue: String, exchange: String, routing_key: String, nowait: Bool, arguments: List(#(String, table.FieldValue)), ) -
QueueBindOk -
QueuePurge(queue: String, nowait: Bool) -
QueuePurgeOk(message_count: Int) -
QueueDelete( queue: String, if_unused: Bool, if_empty: Bool, nowait: Bool, ) -
QueueDeleteOk(message_count: Int) -
QueueUnbind( queue: String, exchange: String, routing_key: String, arguments: List(#(String, table.FieldValue)), ) -
QueueUnbindOk -
BasicQos(prefetch_size: Int, prefetch_count: Int, global: Bool) -
BasicQosOk -
BasicConsume( queue: String, consumer_tag: String, no_local: Bool, no_ack: Bool, exclusive: Bool, nowait: Bool, arguments: List(#(String, table.FieldValue)), ) -
BasicConsumeOk(consumer_tag: String) -
BasicCancel(consumer_tag: String, nowait: Bool) -
BasicCancelOk(consumer_tag: String) -
BasicPublish( exchange: String, routing_key: String, mandatory: Bool, immediate: Bool, ) -
BasicReturn( reply_code: Int, reply_text: String, exchange: String, routing_key: String, ) -
BasicDeliver( consumer_tag: String, delivery_tag: Int, redelivered: Bool, exchange: String, routing_key: String, ) -
BasicGet(queue: String, no_ack: Bool) -
BasicGetOk( delivery_tag: Int, redelivered: Bool, exchange: String, routing_key: String, message_count: Int, ) -
BasicGetEmpty -
BasicAck(delivery_tag: Int, multiple: Bool) -
BasicReject(delivery_tag: Int, requeue: Bool) -
BasicRecoverAsync(requeue: Bool) -
BasicRecover(requeue: Bool) -
BasicRecoverOk -
BasicNack(delivery_tag: Int, multiple: Bool, requeue: Bool) -
ConfirmSelect(nowait: Bool) -
ConfirmSelectOk -
TxSelect -
TxSelectOk -
TxCommit -
TxCommitOk -
TxRollback -
TxRollbackOk
Values
pub fn decode(payload: BitArray) -> Result(Method, Nil)
Decodes a method frame payload. Trailing bytes are rejected.
pub fn encode(method: Method) -> Result(BitArray, String)
Encodes the method frame payload: class id, method id and arguments.
pub fn has_content(method: Method) -> Bool
Whether the method is followed by a content header and body frames.