georaster
georaster copied to clipboard
Reading requires mutability?
Hi I'm brand spanking new to memory management. It seems to make things difficult unnecessarily that using read_pixel requires mutability. Is there a reason this is the case that I'm not understanding?
Fair question. Since the reader state is stored directly in the reader struct, internal data (read position, data buffer) is updated when reading. That said, Rust has a pattern called "interior mutability" to hide internal mutations. PR welcome...