Advent of Code puzzles frequently feature rectangular ASCII descriptions of inputs. I have found having a matrix class with quality-of-life features eases solving these puzzles. Having decided to solve the 2025 edition using Rust, I wanted something similar. The code here is inspired by my previous (unpublished) Kotlin quality-of-life Matrix classes. It's also heavily influenced by someone else's solution.
The code is pure safe-rust with zero dependencies. I make no warranties regarding the quality of the result, nor its fitness for any given purpose. I'm uninterested in pull requests for changes or in bug reports. Clone it and fix it yourself if you are so inclined.