Use builder for creating Job
wezm opened this issue · comments
Wesley Moore commented
Currently setting properties on Job outside of kind and args requires manually building a Job or building a Job with new, then mutating its properties. I'd suggest using a builder to create jobs and make the fields of Job private. My suggested approach would probably be derive_builder.
If this sounds reasonable I'm happy to make this change.
Jon Gjengset commented
Yeah, that makes a lot of sense! I've been wanting to make that change in accordance with C-BUILDER
in the Rust API guidelines too. A PR using derive_builder
seems reasonable to me!
Jon Gjengset commented
@wezm still think you'd like to make this change? I'd be happy to review and merge a change like this!