Behavioral Patterns

Implement the Typestate Pattern in Rust

The typestate pattern is a design pattern that encodes information about an object's run-time state in its compile-time type.