pub(crate) struct FullNeighborhoodIndex {
contributors: FxHashMap<ChunkPos, Weak<ChunkHolder>>,
counts: FxHashMap<ChunkPos, FullNeighborhoodCounts>,
dirty_centers: FxHashSet<ChunkPos>,
pending_readiness: FxHashMap<ChunkPos, PendingReadiness>,
}Fields§
§contributors: FxHashMap<ChunkPos, Weak<ChunkHolder>>§counts: FxHashMap<ChunkPos, FullNeighborhoodCounts>§dirty_centers: FxHashSet<ChunkPos>§pending_readiness: FxHashMap<ChunkPos, PendingReadiness>Implementations§
Source§impl FullNeighborhoodIndex
impl FullNeighborhoodIndex
pub(crate) fn reconcile_contributor( &mut self, pos: ChunkPos, holder: Option<&Arc<ChunkHolder>>, ) -> Result<(), FullNeighborhoodError>
pub(crate) fn remove_contributor_if_matches( &mut self, pos: ChunkPos, holder: &Arc<ChunkHolder>, ) -> Result<(), FullNeighborhoodError>
fn add_contributor( &mut self, pos: ChunkPos, holder: Weak<ChunkHolder>, ) -> Result<(), FullNeighborhoodError>
fn remove_contributor( &mut self, pos: ChunkPos, ) -> Result<(), FullNeighborhoodError>
fn validate_increment( &self, pos: ChunkPos, radius: u8, maximum: u8, ) -> Result<(), FullNeighborhoodError>
fn validate_decrement( &self, pos: ChunkPos, radius: u8, ) -> Result<(), FullNeighborhoodError>
fn adjust_counts(&mut self, pos: ChunkPos, radius: u8, increment: bool)
fn for_each_center(pos: ChunkPos, radius: u8, f: impl FnMut(ChunkPos))
pub(crate) fn mark_dirty(&mut self, pos: ChunkPos)
pub(crate) fn dirty_counts_snapshot( &self, ) -> Vec<(ChunkPos, FullNeighborhoodCounts)>
pub(crate) fn take_dirty_counts( &mut self, ) -> Vec<(ChunkPos, FullNeighborhoodCounts)>
pub(crate) fn ensure_pending_readiness( &mut self, pos: ChunkPos, holder: &Arc<ChunkHolder>, )
pub(crate) fn clear_pending_readiness(&mut self, pos: ChunkPos)
Trait Implementations§
Source§impl Default for FullNeighborhoodIndex
impl Default for FullNeighborhoodIndex
Source§fn default() -> FullNeighborhoodIndex
fn default() -> FullNeighborhoodIndex
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for FullNeighborhoodIndex
impl !UnwindSafe for FullNeighborhoodIndex
impl Freeze for FullNeighborhoodIndex
impl Send for FullNeighborhoodIndex
impl Sync for FullNeighborhoodIndex
impl Unpin for FullNeighborhoodIndex
impl UnsafeUnpin for FullNeighborhoodIndex
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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 moreWraps this value in an
Arc<SyncMutex<>>