component_model 0.17.0

Revolutionary type-safe component assignment for Rust. Build complex objects with zero boilerplate using derive macros and type-driven field setting. Perfect for configuration builders, fluent APIs, and object composition patterns.
Documentation


#[ test ]
fn component_assign()
{

  let mut got: Person = Person ::default();
  got.assign( 13 );
  got.assign( "John" );
  assert_eq!( got, Person { age: 13, name: "John".to_string() } );

  let mut got: Person = Person ::default();
  got = got
  .impute( 13 )
  .impute( "John" )
  ;
  assert_eq!( got, Person { age: 13, name: "John".to_string() } );

}