[][src]Crate amq_protocol_codegen

AMQP code generation utilities

amq-protocol-codegen is a library aiming at providing tools to generate code from official AMQP specs definition.

Structs

AMQPClass

A class as defined in the AMQP specification

AMQPConstant

A constant as defined in the AMQP specification

AMQPFlagArgument

An argument holding flags as defined in the AMQP specification

AMQPMethod

A method as defined in the AMQP specification

AMQPProperty

A property as defined in the AMQP specification

AMQPValueArgument

An argument holding a value as defined in the AMQP specification

AMQProtocolDefinition

Structure holding the definition of the protocol

CamelHelper

Helper for converting text to camel case

ClassNameIsHelper

Helper for checking if a class name is the one provided

EachArgumentHelper

Helper to walk through a Vec of AMQPArgument.

EachFlagHelper

Helper to walk through a Vec of AMQPFlagArgument.

MethodHasFlagHelper

Helper for checking if a method has the given flag argument

MethodHasFlagsHelper

Helper for checking if a method has some flags argument

SanitizeNameHelper

Helper to sanitize name so the it becomes a valid identifier

SnakeHelper

Helper for converting text to snake case

SnakeTypeHelper

Helper for getting the type name converted to snake case

Enums

AMQPArgument

An argument as defined in the AMQP specification

Traits

HandlebarsAMQPExtension

Our extension for better integration with Handlebars

Named

Trait allowing us to get the name of an implementor in different forms

Functions

camel_case

Convert input to camel case

snake_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

CodeGenerator

Type alias to avoid making our users explicitely depend on an extra dependency