pub struct ColumnMap<C = Column> { /* private fields */ }Expand description
The loaded columns. Version-independent; the version worlds wrap it. C is the column
type (the legacy Column by default; the modern worlds use their own).
Implementations§
Source§impl<C> ColumnMap<C>
impl<C> ColumnMap<C>
Sourcepub fn get_mut(&mut self, cx: i32, cz: i32) -> Option<&mut C>
pub fn get_mut(&mut self, cx: i32, cz: i32) -> Option<&mut C>
Mutable access to a loaded column.
Sourcepub fn contains(&self, cx: i32, cz: i32) -> bool
pub fn contains(&self, cx: i32, cz: i32) -> bool
true when the column has been received and not unloaded.
Sourcepub fn retain(&mut self, keep: impl FnMut(ChunkPos) -> bool)
pub fn retain(&mut self, keep: impl FnMut(ChunkPos) -> bool)
Keeps only the columns for which keep returns true.
Sourcepub fn iter(&self) -> impl Iterator<Item = (ChunkPos, &C)>
pub fn iter(&self) -> impl Iterator<Item = (ChunkPos, &C)>
Iterates the loaded columns (arbitrary order).
Sourcepub fn iter_mut(&mut self) -> impl Iterator<Item = (ChunkPos, &mut C)>
pub fn iter_mut(&mut self) -> impl Iterator<Item = (ChunkPos, &mut C)>
Iterates the loaded columns mutably (arbitrary order).
Sourcepub fn table_bytes(&self) -> usize
pub fn table_bytes(&self) -> usize
Heap bytes of the hash table itself (entries included, column contents excluded).
Trait Implementations§
Auto Trait Implementations§
impl<C> Forget for ColumnMap<C>
impl<C> Freeze for ColumnMap<C>where
PhantomData<fn() -> ChunkHasher>: Freeze,
*const u8 is !null: Freeze,
PhantomData<(u64, C)>: Freeze,
impl<C> Move for ColumnMap<C>
impl<C> RefUnwindSafe for ColumnMap<C>where
C: RefUnwindSafe,
impl<C> Send for ColumnMap<C>
impl<C> Sync for ColumnMap<C>
impl<C> Unpin for ColumnMap<C>
impl<C> UnsafeUnpin for ColumnMap<C>where
PhantomData<fn() -> ChunkHasher>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<(u64, C)>: UnsafeUnpin,
impl<C> UnwindSafe for ColumnMap<C>
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