Skip to main content

bon_sandbox/state_mod/
minimal.rs

1//! Minimal example of the generated builder and its typestate API.
2//!
3//! This documentation was generated as a showcase for the [Builder's Type Signature] guide.
4//!
5//! [Builder's Type Signature]: https://bon-rs.com/guide/typestate-api/builders-type-signature
6
7/// Example struct with the `#[derive(Builder)]` annotation.
8#[derive(bon::Builder)]
9#[builder(state_mod(vis = "pub"))]
10pub struct Example {
11    x1: u32,
12    x2: u32,
13}