In the previous chapter, we covered the basics of error handling in Rust and how we can design custom error handling for our web service. After working through the last few chapters, you should now have a foundational understanding of how a web service is structured using the Actix Web framework, how you can talk to a relational database for CRUD activities, and how to handle any errors that occur while processing incoming data and requests. In this chapter, we will step up the pace and deal with something that we cannot avoid in the real world: changes.
Every actively used web service or application evolves significantly over its lifecycle, based on user feedback or business requirements. Many of these new requirements could mean breaking changes to the web service or application. In this chapter, you’ll learn how Rust helps you cope with situations involving drastic design changes and the rewriting of significant parts of your existing code. You’ll use the power of the Rust compiler and the features of the language to come out of this challenge with a smile on your face.