24 days of Rust – derive_builder
Today our focus is the derive_builder
crate. It provides a macro to automatically generate setter methods
for struct fields. And since all setters return the struct itself,
we can chain them in a so called builder pattern.
After the post by Steve Klabnik, “Rust is more than safety”, and a reply by Graydon Hoare, “Rust is mostly safety” - I thought it wise to throw my opinion into the mix, whether warranted or not. This is going to be a long article, which I hope rai...Read more »