September 5, 2021

State machines in Rust

In Rust, you often hear about state machines. Futures are state machines! I thought it would be cool to read more about it. I came across this blog post (funnily enough, by a friend and mentor of mine) which really helped me! I highly recommend reading it. In this bakery post, I’m just noting the part I found relevant. The example here is from her blog post. P.S.A: Go and read that post 😆 Read more

September 5, 2021

Two learnings on implementing traits

Some time ago, I came across two challenges with implemeting traits: Implementing a trait on another trait Using multiple, separate traits bounds on a trait implementation Implementing a trait on another trait Honestly, I’ve forgotten why I wanted to do this. Nonetheless, this is not possible in Rust. And rightfully so, can you imagine how much of a mess that would be? However, the way around this is through a neat Rust feature: trait bounds! Read more

Powered by Hugo & Kiss.