use component_model ::ComponentModel;
#[ derive( Default, ComponentModel ) ]
#[ debug ] struct Config
{
host: String,
port: i32,
enabled: bool,
}
fn main()
{
let mut config = Config ::default();
config.host_set( "localhost".to_string() );
config.port_set( 8080i32 );
config.enabled_set( true );
println!( "Config: host={}, port={}, enabled={}", config.host, config.port, config.enabled );
let config2 = Config ::default()
.host_with( "api.example.com".to_string() )
.port_with( 3000i32 )
.enabled_with( false );
println!( "Config2: host={}, port={}, enabled={}", config2.host, config2.port, config2.enabled );
}