pub(super) struct ChunkLoad {
pub(super) chunk: ChunkPos,
request: Option<ChunkRequestHandle>,
pub(super) next_scan: i32,
}Expand description
The chunk the search is currently reading.
Fields§
§chunk: ChunkPos§request: Option<ChunkRequestHandle>None when the chunk is held by the prefetch, which keeps it loaded already.
next_scan: i32Next sequence index to look at. Indices before it need no more work from this chunk.
Implementations§
Source§impl ChunkLoad
impl ChunkLoad
pub(super) fn open( world: &Arc<World>, chunk: ChunkPos, next_scan: i32, held: bool, ) -> Self
pub(super) fn poll(&self, world: &Arc<World>) -> ChunkLoadState
Sourcepub(super) fn scan<T>(
&mut self,
sequence: &CandidateSequence,
budget: &mut PollBudget,
visit: impl FnMut(i32, i32, i32) -> Visit<T>,
) -> ScanEnd<T>
pub(super) fn scan<T>( &mut self, sequence: &CandidateSequence, budget: &mut PollBudget, visit: impl FnMut(i32, i32, i32) -> Visit<T>, ) -> ScanEnd<T>
Visits the candidates of this chunk in sequence order, from where the last scan stopped.
Auto Trait Implementations§
impl !RefUnwindSafe for ChunkLoad
impl !UnwindSafe for ChunkLoad
impl Freeze for ChunkLoad
impl Send for ChunkLoad
impl Sync for ChunkLoad
impl Unpin for ChunkLoad
impl UnsafeUnpin for ChunkLoad
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<>>