former 2.43.0

A flexible implementation of the Builder pattern supporting nested builders and collection-specific subformers. Simplify the construction of complex objects.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Example demonstrating lifetime debugging with Former-derived structs.

#![allow(missing_docs)]

#[ cfg( feature = "enabled" ) ]
use former::Former;

#[ derive( Debug, PartialEq, Former ) ]
// #[ debug ] // Commented out - debug attribute only for temporary debugging
pub struct Test<'a> {
  data: &'a str,
}

fn main() {
  println!("This won't compile, but we can see the debug output");
}