Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
add explanation of which access traits are implemented for ChunkMap
Browse files Browse the repository at this point in the history
  • Loading branch information
bonsairobo committed Dec 17, 2020
1 parent 3b37df0 commit 92319fd
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion crates/building_blocks_storage/src/chunk_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,18 @@ use serde::{Deserialize, Serialize};
/// outside of the stored chunks will return some ambient value specified on creation.
///
/// `ChunkMap` is generic over the type used to actually store the `Chunk`s. You can use any storage that implements
/// `ChunkReadStorage` or `ChunkWriteStorage`.
/// `ChunkReadStorage` or `ChunkWriteStorage`. Being a lattice map, `ChunkMap` will implement various access traits, depending
/// on the capabilities of the chunk storage.
///
/// If the chunk storage implements `ChunkReadStorage`, then `ChunkMap` will implement:
/// - `Get`
/// - `ForEach`
/// - `ReadExtent`
///
/// If the chunk storage implements `ChunkWriteStorage`, then `ChunkMap` will implement:
/// - `GetMut`
/// - `ForEachMut`
/// - `WriteExtent`
pub struct ChunkMap<N, T, Meta, Store> {
/// Translates from lattice coordinates to chunk key space.
pub indexer: ChunkIndexer<N>,
Expand Down

0 comments on commit 92319fd

Please sign in to comment.