pub struct GridView<'a> {
pub width: u32,
pub height: u32,
pub cells: &'a [u8],
pub palette: &'static [[u8; 4]],
}Expand description
A 2D grid for rendering, each cell a u8 index into the palette.
Fields§
§width: u32Width in cells.
height: u32Height in cells.
cells: &'a [u8]Palette index of each cell, row-major.
palette: &'static [[u8; 4]]RGBA colours that the cells index.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for GridView<'a>
impl<'a> RefUnwindSafe for GridView<'a>
impl<'a> Send for GridView<'a>
impl<'a> Sync for GridView<'a>
impl<'a> Unpin for GridView<'a>
impl<'a> UnsafeUnpin for GridView<'a>
impl<'a> UnwindSafe for GridView<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more