1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
mod other { use typesafe_builders::prelude::*; #[derive(Builder)] pub struct Struct { x: u8, y: u8, z: Option<u8>, } } fn main() { other::Struct::builder().x(5).y(8).z(None).build(); other::Struct::builder().x(5).y(8).z(Some(7)).build(); }