pub struct ResolvedChunk<'a> { /* private fields */ }Expand description
A chunk’s ground tiles with transitions applied: for each ground layer,
each tile’s prototype, or None for an empty tile. Values borrow from
the source grids and the transitions.
Implementations§
Source§impl<'a> ResolvedChunk<'a>
impl<'a> ResolvedChunk<'a>
Sourcepub fn value(&self, ground: usize, index: usize) -> Option<&'a str>
pub fn value(&self, ground: usize, index: usize) -> Option<&'a str>
The prototype at row-major tile index of ground layer ground.
Sourcepub fn at(&self, ground: usize, [x, y]: [u16; 2]) -> Option<&'a str>
pub fn at(&self, ground: usize, [x, y]: [u16; 2]) -> Option<&'a str>
The prototype at chunk-local [x, y] of ground layer ground.
Sourcepub fn ground_layers(&self) -> usize
pub fn ground_layers(&self) -> usize
How many ground layers it holds.
Trait Implementations§
Source§impl<'a> Clone for ResolvedChunk<'a>
impl<'a> Clone for ResolvedChunk<'a>
Source§impl<'a> Debug for ResolvedChunk<'a>
impl<'a> Debug for ResolvedChunk<'a>
impl<'a> Eq for ResolvedChunk<'a>
Source§impl<'a> PartialEq for ResolvedChunk<'a>
impl<'a> PartialEq for ResolvedChunk<'a>
impl<'a> StructuralPartialEq for ResolvedChunk<'a>
Auto Trait Implementations§
impl<'a> Forget for ResolvedChunk<'a>
impl<'a> Freeze for ResolvedChunk<'a>
impl<'a> Move for ResolvedChunk<'a>
impl<'a> RefUnwindSafe for ResolvedChunk<'a>
impl<'a> Send for ResolvedChunk<'a>
impl<'a> Sync for ResolvedChunk<'a>
impl<'a> Unpin for ResolvedChunk<'a>
impl<'a> UnsafeUnpin for ResolvedChunk<'a>
impl<'a> UnwindSafe for ResolvedChunk<'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