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(dead_code)]
#[ allow( unused_imports ) ]
use super::*;

#[ derive( Debug, PartialEq, Default ) ]
pub struct Property<Name> {
  name: Name,
  code: isize,
}

/// generated by new
impl<Name> Property<Name> {
  #[ inline ]
  pub fn new<Code>(name: Name, code: Code) -> Self
  where
    Name: core::convert::Into<Name>,
    Code: core::convert::Into<isize>,
  {
    Self {
      name: name.into(),
      code: code.into(),
    }
  }
}

#[ derive( Debug, PartialEq, the_module::Former ) ]
// #[ derive( Debug, PartialEq, the_module::Former ) ] #[ debug ]
// #[ derive( Debug, PartialEq ) ]
pub struct Child<K>
where
  K: core::hash::Hash + core::cmp::Eq,
{
  pub name: String,
  #[ subform_collection( definition = former::HashMapDefinition ) ]
  pub properties: collection_tools::HashMap<K, Property<K>>,
}

// == begin_coercing of generated

// == end of generated

include!("./only_test/parametrized_struct.rs");