https://stlplaces.com/blog/how-to-use-pattern-matching-in-rust.