jonhoo / faktory-rs

Rust bindings for Faktory clients and workers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use builder for creating Job

wezm opened this issue · comments

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.

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!

@wezm still think you'd like to make this change? I'd be happy to review and merge a change like this!