diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-12-31 09:00:21 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-12-31 12:10:10 +0200 |
commit | acf1ba3f8f1492b961c9a6eb09eb93e882f5eb3f (patch) | |
tree | 1ce0288f878cac71990bb01f358d6035f1626c92 /src/benchmark.rs | |
parent | 686e87981db210fa443404c8473dfe7a3f39b241 (diff) | |
download | obnam2-acf1ba3f8f1492b961c9a6eb09eb93e882f5eb3f.tar.gz |
docs: add documentation comments to crate
Also, make it an error for a public symbol to not be documented.
Sponsored-by: author
Diffstat (limited to 'src/benchmark.rs')
-rw-r--r-- | src/benchmark.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/benchmark.rs b/src/benchmark.rs index e5057ac..d2d9003 100644 --- a/src/benchmark.rs +++ b/src/benchmark.rs @@ -1,15 +1,20 @@ +//! Benchmark chunk generation. +//! +//! This is only for development. + use crate::checksummer::Checksum; use crate::chunk::DataChunk; use crate::chunkid::ChunkId; use crate::chunkmeta::ChunkMeta; -// Generate a desired number of empty data chunks with id and metadata. +/// Generate a desired number of empty data chunks with id and metadata. pub struct ChunkGenerator { goal: u32, next: u32, } impl ChunkGenerator { + /// Create a new ChunkGenerator. pub fn new(goal: u32) -> Self { Self { goal, next: 0 } } |