pub struct ChunkArray<T>(pub [[T; 32]; 32]);
Expand description
Generic array for data stored per chunk of a region
Includes various convenient iteration functions.
Tuple Fields§
§0: [[T; 32]; 32]
Implementations§
Source§impl<T> ChunkArray<T>
impl<T> ChunkArray<T>
Sourcepub fn keys() -> impl Iterator<Item = ChunkCoords> + Clone + Debug
pub fn keys() -> impl Iterator<Item = ChunkCoords> + Clone + Debug
Iterates over all possible chunk coordinate pairs used as ChunkArray keys
Trait Implementations§
Source§impl<'__de, T, __Context> BorrowDecode<'__de, __Context> for ChunkArray<T>where
T: BorrowDecode<'__de, __Context>,
impl<'__de, T, __Context> BorrowDecode<'__de, __Context> for ChunkArray<T>where
T: BorrowDecode<'__de, __Context>,
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl<T: Clone> Clone for ChunkArray<T>
impl<T: Clone> Clone for ChunkArray<T>
Source§fn clone(&self) -> ChunkArray<T>
fn clone(&self) -> ChunkArray<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug> Debug for ChunkArray<T>
impl<T: Debug> Debug for ChunkArray<T>
Source§impl<T, __Context> Decode<__Context> for ChunkArray<T>where
T: Decode<__Context>,
impl<T, __Context> Decode<__Context> for ChunkArray<T>where
T: Decode<__Context>,
Source§impl<T: Default> Default for ChunkArray<T>
impl<T: Default> Default for ChunkArray<T>
Source§fn default() -> ChunkArray<T>
fn default() -> ChunkArray<T>
Returns the “default value” for a type. Read more
Source§impl<T> Encode for ChunkArray<T>where
T: Encode,
impl<T> Encode for ChunkArray<T>where
T: Encode,
Source§impl<T> Index<ChunkCoords> for ChunkArray<T>
impl<T> Index<ChunkCoords> for ChunkArray<T>
Source§impl<T> IndexMut<ChunkCoords> for ChunkArray<T>
impl<T> IndexMut<ChunkCoords> for ChunkArray<T>
impl<T: Copy> Copy for ChunkArray<T>
Auto Trait Implementations§
impl<T> Freeze for ChunkArray<T>where
T: Freeze,
impl<T> RefUnwindSafe for ChunkArray<T>where
T: RefUnwindSafe,
impl<T> Send for ChunkArray<T>where
T: Send,
impl<T> Sync for ChunkArray<T>where
T: Sync,
impl<T> Unpin for ChunkArray<T>where
T: Unpin,
impl<T> UnwindSafe for ChunkArray<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more