Skip to content

Allow #[builder(on(Vec, default))] #366

Closed

Description

@Kriskras99

I want to add builders to all types generated by prost-build.

All fields are optional, but Prost will generate a Vec instead of an Option<Vec>.
So it would be useful to do #[builder(on(Vec, default))], so those fields are optional too.

Activity

  1. Veetaha commented on Feb 10, 2026

    @Veetaha
    Collaborator

    Makes sense, we should definitely have smth like this. The type pattern for Vec is Vec<_>, so it should be #[builder(on(Vec<_>, default))]. The default attribute in this position can only be a boolean switch and nothing more until #152

  2. added
    feature request
    on Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions