Skip to content

#[builder(into)] #8

@mmastrac

Description

@mmastrac

Allowing a builder for T to be anything impl Into<T> would be useful in a lot of real-world cases:

ie:

            ConfigSchemaPropertyBuilder::new()
                .with_name("validate_certs".to_string())
                .with_target(ConfigSchemaPrimitiveType::Bool.to_schema_type())
                .build(),

could become:

            ConfigSchemaPropertyBuilder::new()
                .with_name("validate_certs")
                .with_target(ConfigSchemaPrimitiveType::Bool)
                .build(),

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions