docs: clarify rache's API model - #11
Merged
Merged
Conversation
Source readers currently encounter crate-private byte helpers before the four public families, and XXH32/XXH64 order their one-shot convenience method before the configured constructor. Put the public surface first and use the same constructor-first method order as the other streaming states.
The existing family summary does not explain how one-shot functions, incremental states, std::io::Write, Hasher, and BuildHasher relate. Give callers a single capability map, explain why 128-bit and CityHash variants have fewer adapters, and distinguish namespaced one-shot conveniences from separate hashing modes.
Users often land on a family module directly from docs.rs. Describe each family's variants, configuration, streaming and hash-table capabilities, important limitations, and a minimal runnable example without requiring the crate overview as prior context.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
std::io::Write,Hasher, andBuildHasher.Design Notes
This follows the strongest documentation pattern shared by AsyncBand and DataSketches: establish project scope, give users a task-oriented map, then make each module useful when reached directly from docs.rs. Existing APIs remain unchanged.
Associated
oneshotmethods are retained and documented as namespaced delegates to the module-level functions. Although they duplicate the free-function surface, removing them would trade a modest reduction in API size for a real discoverability and compatibility cost without evidence of caller harm.No changelog entry is included because the changes do not alter supported or observable behavior.
Validation
cargo x lintcargo x checkcargo x test