Crate amq_protocol_codegen
source ·Expand description
AMQP code generation utilities
amq-protocol-codegen is a library aiming at providing tools to generate code from official AMQP specs definition.
Structs
A class as defined in the AMQP specification
A constant as defined in the AMQP specification
An argument holding flags as defined in the AMQP specification
A method as defined in the AMQP specification
A property as defined in the AMQP specification
An argument holding a value as defined in the AMQP specification
Structure holding the definition of the protocol
Helper for converting text to camel case
Helper to walk through a Vec of AMQPArgument.
Helper to walk through a Vec of AMQPFlagArgument.
Helper for checking is a method has some flags argument
Helper to sanitize name so the it becomes a valid identifier
Helper for converting text to snake case
Helper for getting the type name converted to snake case
Enums
An argument as defined in the AMQP specification
Traits
Our extension for better integration with Handlebars
Trait allowing us to get the name of an implementor in different forms
Functions
Convert input to camel case
Convert input to snake case
For the purpose of the AMQP codegen usage, we also handle a few special cases:
“type” becomes “type_”
“return” becomes “return_”
A word needs to be composed of at least two letters, this makes UInt become uint and not u_int
Type Definitions
Type alias to avoid making our users explicitely depend on an extra dependency