pub trait ChunkMapBuilder<N, T>: Sized {
type Chunk: Chunk;
// Required methods
fn chunk_shape(&self) -> PointN<N>;
fn ambient_value(&self) -> T;
fn new_ambient(&self, extent: ExtentN<N>) -> Self::Chunk;
// Provided methods
fn build_with_rw_storage<Store>(
self,
storage: Store,
) -> ChunkMap<N, T, Self, Store>
where PointN<N>: IntegerPoint<N>,
Store: ChunkReadStorage<N, Self::Chunk> + ChunkWriteStorage<N, Self::Chunk> { ... }
fn build_with_read_storage<Store>(
self,
storage: Store,
) -> ChunkMap<N, T, Self, Store>
where PointN<N>: IntegerPoint<N>,
Store: ChunkReadStorage<N, Self::Chunk> { ... }
fn build_with_write_storage<Store>(
self,
storage: Store,
) -> ChunkMap<N, T, Self, Store>
where PointN<N>: IntegerPoint<N>,
Store: ChunkWriteStorage<N, Self::Chunk> { ... }
fn build_with_hash_map_storage(
self,
) -> ChunkMap<N, T, Self, AHashMap<ChunkKey<N>, Self::Chunk>>
where PointN<N>: IntegerPoint<N>,
ChunkKey<N>: Eq + Hash { ... }
}Expand description
An object that knows how to construct chunks for a ChunkMap.
Required Associated Types§
Required Methods§
fn chunk_shape(&self) -> PointN<N>
fn ambient_value(&self) -> T
Sourcefn new_ambient(&self, extent: ExtentN<N>) -> Self::Chunk
fn new_ambient(&self, extent: ExtentN<N>) -> Self::Chunk
Construct a new chunk with entirely ambient values.
Provided Methods§
Sourcefn build_with_rw_storage<Store>(
self,
storage: Store,
) -> ChunkMap<N, T, Self, Store>where
PointN<N>: IntegerPoint<N>,
Store: ChunkReadStorage<N, Self::Chunk> + ChunkWriteStorage<N, Self::Chunk>,
fn build_with_rw_storage<Store>(
self,
storage: Store,
) -> ChunkMap<N, T, Self, Store>where
PointN<N>: IntegerPoint<N>,
Store: ChunkReadStorage<N, Self::Chunk> + ChunkWriteStorage<N, Self::Chunk>,
Create a new ChunkMap with the given storage which must implement both ChunkReadStorage and ChunkWriteStorage.
Sourcefn build_with_read_storage<Store>(
self,
storage: Store,
) -> ChunkMap<N, T, Self, Store>
fn build_with_read_storage<Store>( self, storage: Store, ) -> ChunkMap<N, T, Self, Store>
Create a new ChunkMap with the given storage which must implement ChunkReadStorage.
Sourcefn build_with_write_storage<Store>(
self,
storage: Store,
) -> ChunkMap<N, T, Self, Store>
fn build_with_write_storage<Store>( self, storage: Store, ) -> ChunkMap<N, T, Self, Store>
Create a new ChunkMap with the given storage which must implement ChunkWriteStorage.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.