pub struct ChunkDataRequest {
pub subchunks: Vec<SubchunkDataRequirement>,
pub height_map: bool,
pub biome: BiomeDataRequirement,
pub block_entities: bool,
}Expand description
Composable map-data contract used to plan storage reads and subchunk decoding.
Add only the representations a consumer needs. The loader unions all requested subchunk records and chooses the least expensive decoder that satisfies them.
Fields§
§subchunks: Vec<SubchunkDataRequirement>Independent subchunk representations to load.
height_map: boolWhether raw height-map data is required.
biome: BiomeDataRequirementOptional biome payload requirement.
block_entities: boolWhether block-entity NBT is required.
Implementations§
Source§impl ChunkDataRequest
impl ChunkDataRequest
Sourcepub fn surface_columns(self, policy: ExactSurfaceSubchunkPolicy) -> Self
pub fn surface_columns(self, policy: ExactSurfaceSubchunkPolicy) -> Self
Requests exact terrain columns with the selected subchunk probing policy.
Sourcepub fn cave_slice(self, y: i32) -> Self
pub fn cave_slice(self, y: i32) -> Self
Requests a cave slice at one world Y coordinate.
Sourcepub fn full_3d_indices(self) -> Self
pub fn full_3d_indices(self) -> Self
Requests full 3D random-access indices for every subchunk in a chunk.
Sourcepub const fn height_map(self) -> Self
pub const fn height_map(self) -> Self
Requests raw height-map data.
Sourcepub const fn biome(self, biome: BiomeDataRequirement) -> Self
pub const fn biome(self, biome: BiomeDataRequirement) -> Self
Sets the optional biome payload requirement.
Sourcepub const fn block_entities(self) -> Self
pub const fn block_entities(self) -> Self
Requests block-entity NBT records.
Trait Implementations§
Source§impl Clone for ChunkDataRequest
impl Clone for ChunkDataRequest
Source§fn clone(&self) -> ChunkDataRequest
fn clone(&self) -> ChunkDataRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChunkDataRequest
impl Debug for ChunkDataRequest
Source§impl Default for ChunkDataRequest
impl Default for ChunkDataRequest
Source§fn default() -> ChunkDataRequest
fn default() -> ChunkDataRequest
Returns the “default value” for a type. Read more
impl Eq for ChunkDataRequest
Source§impl PartialEq for ChunkDataRequest
impl PartialEq for ChunkDataRequest
impl StructuralPartialEq for ChunkDataRequest
Auto Trait Implementations§
impl Freeze for ChunkDataRequest
impl RefUnwindSafe for ChunkDataRequest
impl Send for ChunkDataRequest
impl Sync for ChunkDataRequest
impl Unpin for ChunkDataRequest
impl UnsafeUnpin for ChunkDataRequest
impl UnwindSafe for ChunkDataRequest
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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