Hi, I’m fairly new to Rust, so hoping some experienced people can
attack critique my code.
I wrote a
builder_macro! that generates a struct and a corresponding builder. I have the following questions regarding best practice which probably makes sense after you’ve seen the builder macro docs:
Is it generally better to return
Result<T, E>in the
[Builder pattern question] suggests it’s not a necessity.
In terms of usage, it’s a
People can use catch_unwind if
build()panics, but it doesn’t look like good practice.
Is there a reason why only
cfgare copied across? (cc: @colin_kiegel)
I know I gave up on
#[derive(Builder)]when hitting an error when having a lifetime error
I can’t seem to reproduce it though – I hacked something which happily used the
Any other comments around things I don’t know to ask