I would think if this crate could generate new and the struct has private fields, then the implementation of new could call validate, thus making it impossible to instantiate invalid.
But currently you dev has to remember to call validate, so what can we do to guarantee it gets called?
I would think if this crate could generate
newand the struct has private fields, then the implementation ofnewcould callvalidate, thus making it impossible to instantiate invalid.But currently you dev has to remember to call
validate, so what can we do to guarantee it gets called?