Module virtue::generate

source ·
Expand description

Code to help generate functions.

The structure is:

Afterwards, Generator::finish() must be called to take out the TokenStream produced.

Structs§

  • A builder for struct or enum variant fields.
  • A builder for functions.
  • A builder for constants.
  • Builder to generate an enum <Name> { <value> { ... }, ... }
  • Builder to generate a struct. Defaults to a struct with named fields struct <Name> { <field>: <ty>, ... }
  • Builder for generating a module with its contents.
  • The generator is used to generate code.
  • A helper struct for implementing functions for a given struct or enum.
  • A helper struct for implementing a trait for a given struct or enum.
  • A path of identifiers, like mod::Type.
  • Failed to parse the code passed to StreamBuilder::push_parsed
  • A helper struct build around a TokenStream to make it easier to build code.

Enums§

Traits§

  • Helper trait to make it possible to nest several builders. Internal use only.