-
current: #[derive(Debug, Clone, Builder, Default)]
#[builder]
pub struct A {
#[builder(default)] // here
pub name: String,
} How to do this? #[derive(Debug, Clone, Builder, Default)]
#[builder(default)] // struct level default
pub struct A {
pub name: String,
} |
Beta Was this translation helpful? Give feedback.
Answered by
Veetaha
Oct 20, 2024
Replies: 1 comment 2 replies
-
Hi! Thank you for opening a discussion. The short answer is that currently there is no syntax to set I've created an issue with the anticipated design for this. I'd be glad to hear any feedback about it: #152 |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
rain2307
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! Thank you for opening a discussion. The short answer is that currently there is no syntax to set
default
at the top level. However, it's something that I'm planning to add in the next several releases. I've been thinking on the design of this feature trying to select the most intuitive behavior for this.I've created an issue with the anticipated design for this. I'd be glad to hear any feedback about it: #152