Skip to content

Conversation

@tomoikey
Copy link
Owner

@tomoikey tomoikey commented Aug 7, 2025

Closes #8

Summary

  • Add support for #[builder(into)] attribute to automatically convert setter parameters using Into trait
  • Improves ergonomics by allowing string literals and other types to be passed directly to setters that expect String

Changes

  • Added into_flag field to InputField struct to track #[builder(into)] attribute
  • Modified setter generation to use impl Into<T> parameter type when into flag is present
  • Updated field info tuple to include into flag information
  • Added test case demonstrating the functionality

Relates to

#8

@tomoikey tomoikey changed the title feat: add support for #[builder(into)] attribute feat: add support for #[builder(into)] attribute Aug 7, 2025
@tomoikey tomoikey force-pushed the feat/support_into branch from c6a9def to b2921f1 Compare August 7, 2025 23:12
@tomoikey tomoikey force-pushed the feat/support_into branch from b2921f1 to 0e9e7f5 Compare August 7, 2025 23:26
@tomoikey tomoikey self-assigned this Aug 7, 2025
@tomoikey tomoikey added the enhancement New feature or request label Aug 7, 2025
@tomoikey tomoikey merged commit c3225eb into main Aug 7, 2025
1 check passed
@tomoikey tomoikey deleted the feat/support_into branch August 7, 2025 23:29
@tomoikey tomoikey mentioned this pull request Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

#[builder(into)]

1 participant