Struct endlessgrid::Chunk
source · pub struct Chunk<T> { /* private fields */ }
Expand description
A Chunk
of the Grid
Implementations§
source§impl<T: Clone> Chunk<T>
impl<T: Clone> Chunk<T>
sourcepub fn bottom_right(&self) -> (i32, i32)
pub fn bottom_right(&self) -> (i32, i32)
Gets the bottom right index of the chunk
sourcepub fn get_local(&self, local: usize) -> Option<&Option<T>>
pub fn get_local(&self, local: usize) -> Option<&Option<T>>
Get element in chunk using local position within the chunk
sourcepub fn get_local_mut(&mut self, local: usize) -> Option<&mut T>
pub fn get_local_mut(&mut self, local: usize) -> Option<&mut T>
Get element in chunk using local position within the chunk
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for Chunk<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Chunk<T>where
T: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a, T: Clone> IntoIterator for &'a Chunk<T>
impl<'a, T: Clone> IntoIterator for &'a Chunk<T>
source§impl<'a, T: Clone> IntoIterator for &'a mut Chunk<T>
impl<'a, T: Clone> IntoIterator for &'a mut Chunk<T>
Auto Trait Implementations§
impl<T> Freeze for Chunk<T>
impl<T> RefUnwindSafe for Chunk<T>where
T: RefUnwindSafe,
impl<T> Send for Chunk<T>where
T: Send,
impl<T> Sync for Chunk<T>where
T: Sync,
impl<T> Unpin for Chunk<T>where
T: Unpin,
impl<T> UnwindSafe for Chunk<T>where
T: UnwindSafe,
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