This crate provides a derive macro that implements the builder lite pattern.
Since this was designed to be used by eiga, it makes some assumptions:
- The target struct has named fields.
- Optional fields have their type written as
Option<...>. The macro won't recognize theOptiontype in any other form, e.g.,std::option::Option. - Optional fields represent query string parameters.
Example
Applying #[derive(Builder)] to
# use Builder;
generates
#