Crate derive_builder_core [] [src]

Internal helper library for the derive_builder crate.

Important Note:

  • You are probably looking for the derive_builder crate, which wraps this crate and is much more ergonomic to use.
  • The API of this crate might change frequently in the near future. The derive_builder crate also provides a much more stable API.

Purpose

This is an internal helper library of derive_builder. Its purpose is to allow derive_builder to use its own code generation technique, if needed.

derive_builder_core might also be used in crates that derive_builder depends on - again to break a dependency cycle.

If derive_builder does not itself depend on your crate, then you should consider using derive_builder instead of derive_builder_core.

Structs

Bindings

Bindings to be used by the generated code.

Block

A permissive wrapper for expressions/blocks, implementing quote::ToTokens.

BuildMethod

Initializer for the struct fields in the build method, implementing quote::ToTokens.

Builder

Builder, implementing quote::ToTokens.

BuilderField

Field for the builder struct, implementing quote::ToTokens.

DeprecationNotes

Deprecation notes we want to emit to the user, implementing quote::ToTokens.

Initializer

Initializer for the target struct fields, implementing quote::ToTokens.

RawTokens

RawTokens can be directly appended to a quote::Tokens instance without any parsing.

Setter

Setter for the struct fields in the build method, implementing quote::ToTokens.

Enums

BuilderPattern

Controls the signature of a setter method, more specifically how self is passed and returned.

Functions

doc_comment_from

Doc-comment, implementing quote::ToTokens.