Slowly working my way through this book, and my mind keeps getting bent.
«By implementing the state pattern exactly as it’s defined for object-oriented languages, we’re not taking as full advantage of Rust’s strengths as we could. Let’s look at some changes we can make to the
blog
crate that can make invalid states and transitions into compile time errors.»
https://doc.rust-lang.org/book/ch17-03-oo-design-patterns.html
Oh, btw:
https://www.digitalocean.com/community/tutorials/gangs-of-four-gof-design-patterns