Skip to content

[Docs] API Reference section in README is missing return types and error variants for MockEnvBuilder methods #772

Description

@ekelemepraise-code

Summary

The API Reference section in README.md lists method signatures for MockEnvBuilder but omits:

  • Return types (every method just says -> Self)
  • Error conditions (what panics, what validates)
  • Available feature flags that gate certain methods

What's Missing

Method Missing Info
.with_wasm(wasm: &[u8]) No mention of what happens with invalid WASM
.with_protocol_version() No list of valid versions
.capture_logs() No mention of how to retrieve captured logs
.track_costs() No mention of feature flag requirement

Proposed Work

  1. Expand each builder method with a "Panics" / "Errors" sub-section
  2. Add feature flag annotations (e.g., [requires: feature = "snapshots"])
  3. Cross-link to examples in examples/ for each method
  4. Add a "Common Mistakes" callout box

Acceptance Criteria

  • Every public MockEnvBuilder method documented with panics and errors
  • Feature flags clearly annotated
  • Prose reviewed and consistent

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions