1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! Comprehensive example of the generated builder and its typestate API.
//!
//! The preliminary reading of [Typestate API](https://bon-rs.com/guide/typestate-api)
//! guide is recommended to understand how the pieces in this example fit together.
//!
//! This module contains a struct [`Example`] that was annotated with [`#[derive(Builder)]`](bon::Builder).
//! The config [`#[builder(state_mod(vis = "pub"))]`](https://bon-rs.com/reference/builder/top-level/state_mod)
//! was applied to make the generated builder's typestate API public and visible here in the docs.
//!
//! The following was generated by the macro:
//! - [`ExampleBuilder`] - the builder struct itself
//! - [`example_builder`] - the builder's typestate API module
/// Example struct with the `#[derive(Builder)]` annotation.