Essential session storage is required to sign in. Optional analytics remain off unless you allow them.
Build a reusable LIBRARY crate (cargo new --lib): a generic data structure or algorithm parameterized over a type with trait BOUNDS (e.g. T: Ord), at least one CUSTOM trait with implementations for multiple types, an iterator or closure-based API, and a proper error type (Result, not panics). Add a lifetime annotation where one is genuinely needed. Document the public API with /// comments that include runnable DOC TESTS, and write a unit + integration test suite. Make it ready to publish (Cargo.toml metadata).
A generic API with correct trait bounds plus a custom trait implemented for 2+ types; static dispatch where it fits.
A justified lifetime annotation; the borrow checker satisfied; no leaky abstractions or needless clones.
Unit + integration tests pass via cargo test; /// doc comments with doc tests that compile and run.
Clean module structure (pub surface deliberate); Cargo.toml ready for crates.io.
Use this README structure to make the work reviewable.
DevPath fetches a read-only, size-capped snapshot. Submitted code is never executed.
# A library crate with generics, traits & doc tests ## Goal Build a reusable LIBRARY crate (cargo new --lib): a generic data structure or algorithm parameterized over a type with trait BOUNDS (e.g. T: Ord), at least one CUSTOM trait with implementations for multiple types, an iterator or closure-based API, and a proper error type (Result, not panics). Add a lifetime annotation where one is genuinely needed. Document the public API with /// comments that include runnable DOC TESTS, and write a unit + integration test suite. Make it ready to publish (Cargo.toml metadata). ## Acceptance criteria - [ ] Generics & traits: A generic API with correct trait bounds plus a custom trait implemented for 2+ types; static dispatch where it fits. - [ ] Lifetimes & correctness: A justified lifetime annotation; the borrow checker satisfied; no leaky abstractions or needless clones. - [ ] Tests & docs: Unit + integration tests pass via cargo test; /// doc comments with doc tests that compile and run. - [ ] Crate quality: Clean module structure (pub surface deliberate); Cargo.toml ready for crates.io. ## Verification - [ ] Document installation and run commands. - [ ] Record automated checks and their exact commands. - [ ] Add representative output, screenshots, or a short demo where useful. - [ ] Confirm failure paths and known constraints. ## Decision log ### Decision title - Context: - Choice: - Alternatives considered: - Tradeoffs: ## Evidence - Link each rubric criterion to the file, test, or artifact that demonstrates it. ## Known limitations - List what is intentionally out of scope and what should be improved next.