bon
is a Rust crate for generating compile-time-checked builders for functions and structs.
Visit the guide for a complete overview of the crate.
Quick example
bon
can turn a function with positional parameters into a function with "named" parameters via a builder. It's as easy as placing the #[builder]
macro on top of it.
use builder;
let greeting = greet
.name
.age
.call;
assert_eq!;
See the guide for the rest.