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
#![allow(clippy::used_underscore_binding, clippy::all, warnings, missing_docs)]
#[ allow( unused_imports ) ]
use super::*;
#[ allow( unused_imports ) ]
use test_tools::a_id;
#[ allow( unused_imports ) ]
use test_tools::exposed::*;

//

tests_impls! {
  fn test_alias()
  {
    #[ derive( Debug, PartialEq, the_module::Former ) ]
    // #[ derive( Debug, PartialEq, the_module::Former ) ] #[ debug ]
    // #[ derive( Debug, PartialEq ) ]
    pub struct AliasTestStruct
    {
      #[ scalar( name = first_field ) ]
      string_field : String,
      #[ scalar( name = second_field ) ]
      i32_field : i32,
      i8_field : i8,
    }

    // == begin of generated

    // == end of generated

    let test_struct = AliasTestStruct::former()
    .first_field( "first_field" )
    .second_field( 2 )
    // .i32_field( 2 )
    .i8_field( 1 )
    .form();

    let expected_struct = AliasTestStruct
    {
      string_field: "first_field".to_string(),
      i32_field: 2,
      i8_field: 1,
    };

    a_id!( test_struct, expected_struct );
  }
}

//

// xxx : Re-enable when trailing comma issue is fully fixed in macro_tools::generic_params::decompose
tests_index! {
  test_alias,
}