Implement builder pattern by sharifhsn · Pull Request #168 · sharkdp/hexyl
One last thing: do you feel it's necessary to add documentation to the new PrinterBuilder struct? I feel like the builder functions are self-documenting, but perhaps the new function and build function should have examples for those unfamiliar with the builder pattern.
Thank you for your concern. Adding documentation is always great, but I wouldn't see this as a requirement for this PR. This changeset already improves hexyl as a library significantly.
There was no documentation before because - to be honest - I only support hexyl-the-public-library in a "best effort" manner.
So I suggest we merge this as is, but new PRs are always welcome of course!