Module pw_format::macros

source ·
Expand description

The macro module provides helpers that simplify writing proc macros that take format strings and arguments. This is accomplish with three main constructs:

Additionally PrintfFormatMacroGenerator trait and generate_printf function are provided to help when implementing generators that need to produce printf style format strings as part of their code generation.

§Example

An example of implementing a proc macro is provided in the pw_format_example_macro crate

Structs§

Enums§

Traits§

Functions§

  • Generate code for a pw_format style proc macro.
  • Generate code for a pw_format style proc macro that needs a core::fmt format string.
  • Generate code for a pw_format style proc macro that needs a printf format string.

Type Aliases§

  • An alias for a Result with an Error