Skip to content

docs: complete rustdoc pass — crate docs, all public items, #[must_use] - #97

Merged
claude[bot] merged 1 commit into
masterfrom
claude/docs-pass-1sub94
Aug 5, 2026
Merged

docs: complete rustdoc pass — crate docs, all public items, #[must_use]#97
claude[bot] merged 1 commit into
masterfrom
claude/docs-pass-1sub94

Conversation

@claude

@claude claude Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Batch 6b (audit finding #8: docs.rs rendered nearly empty — 275 undocumented public items, zero #[must_use], one line of crate docs).

  • Crate-level docs in lib.rs: overview of the three layers (parser / fetchers / spiders), a runnable Selector quickstart doctest, no_run fetch and Spider examples, feature highlights.
  • #[warn(missing_docs)] enabled and every public item across all 36 source files documented — module docs, structs, enums (incl. all error variants), public fields, the full Spider trait with per-method defaults/units/engine interaction, every public function. Docs were written from the actual function bodies (e.g. find_by_text deepest-match semantics, Scheduler fingerprint-at-enqueue dedup, TextHandler::clean exact behavior, AutoThrottle reserve/record protocol, RFC 9309 robots matching).
  • #[must_use] on the five builder types + LinkExtractor/CrawlRule and on pure query methods (Selector/Selectors/TextHandler/AttributesHandler/Response accessors, …); deliberately not on setters, hooks, or I/O.
  • No runtime behavior changed — docs, attributes, and doc examples only.

Gates: cargo test 344 passed (incl. doctests), clippy --all-targets --all-features -D warnings clean, fmt --check clean, cargo doc --no-deps 0 warnings.

https://claude.ai/code/session_01KDFsMaKk764vogjUW3nqpk


Generated by Claude Code

- Crate-level overview in lib.rs covering the three layers
  (parser/fetchers/spiders) with a runnable Selector quickstart doctest
  plus no_run fetch and minimal-Spider examples, and a feature-highlight
  list (::text/::attr via css_get/css_getall, adaptive relocation,
  stealth headers, robots.txt, AutoThrottle, checkpoints, dev cache,
  CSV/JSON/JSONL/XML export).
- Enabled #![warn(missing_docs)] and documented every public item across
  all 36 source files: modules, structs, enums (incl. error variants),
  traits and their provided methods, public fields, and functions —
  with real semantics (Selector::find_by_text deepest-match rules,
  Scheduler enqueue-time dedup, TextHandler::clean whitespace/entity
  behavior, AttributesHandler ordering, AutoThrottle reserve/record,
  fingerprint options, robots.txt RFC 9309 matching, etc.).
- #[must_use] on builder types (FetcherConfigBuilder,
  SpiderRequestBuilder, CrawlSpider/SitemapSpider/ShopifySpider
  builders, LinkExtractor, CrawlRule) and their build() methods, and on
  pure query/accessor methods whose dropped results are almost
  certainly bugs (Selector css/css_get/css_getall/text/get_all_text/
  find_by_* etc., TextHandler/TextHandlers/AttributesHandler/Selectors
  accessors, Response accessors, stats getters).
- No runtime behavior changes: docs, attributes, and doc examples only.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KDFsMaKk764vogjUW3nqpk
@claude
claude Bot merged commit c0d39c1 into master Aug 5, 2026
7 checks passed
@github-actions
github-actions Bot deleted the claude/docs-pass-1sub94 branch August 5, 2026 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant