You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With restricted visibility stabilizing in 1.18 (see rust-lang/rust#32409), it would be good for derive_builder to support declaring restricted visibility for the generated structs, setters, and fields.
This would also be available in the setter, field, and build_fn sub-options. We could keep the current #[builder(public)] option for compatibility, but I think it probably makes sense to deprecate it since the method above is more future-proof (and easier to validate that it only appears once).
The text was updated successfully, but these errors were encountered:
What would be the new expression for #[builder(setter(private))]? This is needed for overrides. Would it be vis="" or vis="priv"? Both don't look particularly good IMO.
I tried #[builder(pub(crate))], but that doesn't seem to work because the format uses pub(in mod), which won't get passed by syn as a valid meta-item. The private thing is interesting; don't have a good answer there.
With restricted visibility stabilizing in 1.18 (see rust-lang/rust#32409), it would be good for
derive_builder
to support declaring restricted visibility for the generated structs, setters, and fields.Proposal
This would also be available in the
setter
,field
, andbuild_fn
sub-options. We could keep the current#[builder(public)]
option for compatibility, but I think it probably makes sense to deprecate it since the method above is more future-proof (and easier to validate that it only appears once).The text was updated successfully, but these errors were encountered: