pub trait Buffer<T> { // Required methods fn width(&self) -> u32; fn height(&self) -> u32; fn get(&self, x: u32, y: u32) -> &T; }
2D immutable buffer trait.
Buffer width
Buffer height
Get a value at (x, y). This function must not panic when x < self.width() && y < self.height() (unless you want blit functions to panic). It will not be called with values outside of that range.
x < self.width() && y < self.height()