Rust, Software Development

How to use State Design Pattern in Rust

Anything has a state. An entity has a state. Similarly, a car can be in a state of acceleration. While it is accelerating, there are some things it certainly cannot or should not do, e.g., reversing at that very moment. The State Design Pattern treats each state as a struct whose functions represent movements to the other states.

Rust, Software Development

How to use Local Unpublished Crates

At some point in learning Rust, we will encounter the need to create our own crates. They need to go through development and testing before there are published to creates.io. This brief post is about creating and using local unpublished crates.