Add ability to get slice of row.
I would like to be able to get an entire row as a slice. Since the internal vector saves the rows continuously (at least for one of the allocation options, right?), it would be useful to be able to get such a slice, instead of an iterator with .iter_rows. In my use-case, this iterator wouldn't work, because I need to .rev() the rows, and that only works with a slice as far as I'm aware.
Actually, a (probably) simpler implementation that would also solve my problem: grid.iter_rows() should return a DoubleEndedIterator, then I can call grid.iter_rows().rev(), which I need.
Guessing this is for Day 14 of AoC? :) If that's the case, you probably need iter_rows_mut/iter_cols_mut, as you probably want to mutate the contents. I did this by creating the index/col iterator as a usize then using iter_row_mut/iter_col_mut. Also, you need to reverse the row or column, not the collection of rows and columns, and that is supported already. See https://github.com/henryiii/aoc2023/blob/a2a9491daedd6a3167d51d1558af5e3e302b304e/src/bin/14.rs#L64-L90 for my solution.
iter_rows_mut/iter_cols_mut would have made it a bit more elegant.