pub struct LazyAquifer<'a, N: DimensionNoises> {
chunk_min_x: i32,
chunk_min_z: i32,
splitter: &'a RandomSplitter,
noises: &'a N,
inner: Option<Aquifer<N>>,
}Expand description
Deferred Aquifer. Used by create_structures so chunks where no structure
queries the aquifer skip its (expensive) max_preliminary_surface_level scan.
Fields§
§chunk_min_x: i32§chunk_min_z: i32§splitter: &'a RandomSplitter§noises: &'a N§inner: Option<Aquifer<N>>Implementations§
Source§impl<'a, N: DimensionNoises> LazyAquifer<'a, N>
impl<'a, N: DimensionNoises> LazyAquifer<'a, N>
Sourcepub const fn new(
chunk_min_x: i32,
chunk_min_z: i32,
splitter: &'a RandomSplitter,
noises: &'a N,
) -> Self
pub const fn new( chunk_min_x: i32, chunk_min_z: i32, splitter: &'a RandomSplitter, noises: &'a N, ) -> Self
Deferred aquifer for the given chunk.
Sourcepub fn ensure(&mut self, height_cache: &N::ColumnCache) -> &mut Aquifer<N>
pub fn ensure(&mut self, height_cache: &N::ColumnCache) -> &mut Aquifer<N>
Build on first call; height_cache is cloned into the aquifer’s own cache.
§Panics
Never — inner is initialized above if it was None.
Auto Trait Implementations§
impl<'a, N> Freeze for LazyAquifer<'a, N>
impl<'a, N> RefUnwindSafe for LazyAquifer<'a, N>
impl<'a, N> Send for LazyAquifer<'a, N>
impl<'a, N> Sync for LazyAquifer<'a, N>
impl<'a, N> Unpin for LazyAquifer<'a, N>
impl<'a, N> UnsafeUnpin for LazyAquifer<'a, N>
impl<'a, N> UnwindSafe for LazyAquifer<'a, N>
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<>>