Skip to content

Improve rustdoc coverage and enforce missing_docs lint#13

Merged
hardbyte merged 2 commits intomainfrom
docs/improve-rustdoc-coverage
Feb 16, 2026
Merged

Improve rustdoc coverage and enforce missing_docs lint#13
hardbyte merged 2 commits intomainfrom
docs/improve-rustdoc-coverage

Conversation

@hardbyte
Copy link
Copy Markdown
Contributor

Summary

  • Enable #![warn(missing_docs)] to prevent documentation regressions
  • Add a Quick Start section to the module-level docs showing PolicyBuilder usage up front, before the longer manual impl Policy example
  • Add a standalone doc example on PolicyBuilder demonstrating subjects, actions, resources, and when predicates
  • Add an inline doc example for RbacPolicy (was the only built-in policy without one)
  • Document EvalTrace struct and all its methods, AccessEvaluation::display_trace(), and add a code example for AccessEvaluation::to_result()
  • Document all remaining public items: CombineOp variants, PolicyEvalResult fields, Effect variants, RebacPolicy fields, and constructor methods on all policy types

Test plan

  • cargo fmt --all — no changes
  • cargo clippy --all-targets --all-features -- -D warnings — zero warnings
  • cargo doc --no-deps — zero warnings (was 26 before)
  • cargo test --all-targets --all-features — all 53 tests pass (including new doc tests)

Add #![warn(missing_docs)] to prevent documentation regressions. Add
Quick Start section with PolicyBuilder example, standalone PolicyBuilder
doc example, RbacPolicy usage example, and EvalTrace/AccessEvaluation
helper documentation. Document all previously undocumented public items
including CombineOp variants, PolicyEvalResult fields, Effect variants,
RebacPolicy fields, and all constructor methods.
Copilot AI review requested due to automatic review settings February 16, 2026 22:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the crate’s public API documentation and rustdoc quality by enabling missing_docs warnings and adding/expanding examples across core policy and tracing types, helping prevent future documentation regressions.

Changes:

  • Enabled #![warn(missing_docs)] at the crate level.
  • Added a new module-level “Quick Start” section and expanded/added doc examples for PolicyBuilder, RbacPolicy, AccessEvaluation, and EvalTrace.
  • Filled in missing rustdoc on remaining public enums/fields/methods (e.g., CombineOp, Effect, PolicyEvalResult, RebacPolicy, and policy constructors).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Address review feedback: the EvalTrace example now correctly
demonstrates both the empty-trace fallback and a populated trace
using with_root(). Remove unused uuid::Uuid import from the
to_result doc example.
@hardbyte hardbyte merged commit ed5ed83 into main Feb 16, 2026
2 checks passed
@hardbyte hardbyte deleted the docs/improve-rustdoc-coverage branch February 17, 2026 00:34
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.

2 participants