Skip to content

docs: mark response/result structs #[non_exhaustive] (whatsapp-rust#794) - #282

Merged
jlucaso1 merged 5 commits into
mainfrom
claude/eager-cerf-kqhigx
Jun 9, 2026
Merged

docs: mark response/result structs #[non_exhaustive] (whatsapp-rust#794)#282
jlucaso1 merged 5 commits into
mainfrom
claude/eager-cerf-kqhigx

Conversation

@jlucaso1

@jlucaso1 jlucaso1 commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Reflects the changes from whatsapp-rust#794, which added #[non_exhaustive] to all library-returned response and result structs as a pre-1.0 API stabilisation step.

  • changelog/2026-06-09-non-exhaustive.mdx — new breaking-change entry listing all 17 affected types and the .. migration pattern
  • docs.json — added the new changelog page to the navigation
  • api/business.mdx — added #[non_exhaustive] to BusinessProfile, BusinessCategory, BusinessHours, BusinessHoursConfig
  • api/community.mdx — added #[non_exhaustive] to CreateCommunityResult, CommunitySubgroup, LinkSubgroupsResult, UnlinkSubgroupsResult
  • api/contacts.mdx — added #[non_exhaustive] note to UserInfo
  • api/send.mdx — added #[non_exhaustive] to SendResult
  • api/upload.mdx — added #[non_exhaustive] to UploadResponse
  • api/groups.mdx — added #[non_exhaustive] to CreateGroupResult and ParticipantChangeResponse

Generated by Claude Code

jlucaso1 added 3 commits June 9, 2026 10:50
Covers the pre-1.0 API stabilisation pass that marks 22 library-returned
structs as #[non_exhaustive]. Adds a new changelog entry, updates the
navigation, and annotates the affected struct definitions in the API
reference pages (send, upload, groups, community, business, contacts).
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jlucaso1, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 30 minutes and 15 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0f169813-2f20-4c49-a6ac-4c693a1422ed

📥 Commits

Reviewing files that changed from the base of the PR and between bd6532a and e27ac57.

📒 Files selected for processing (8)
  • api/business.mdx
  • api/community.mdx
  • api/contacts.mdx
  • api/groups.mdx
  • api/send.mdx
  • api/upload.mdx
  • changelog/2026-06-09-non-exhaustive.mdx
  • docs.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/eager-cerf-kqhigx

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a90dce210b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread api/business.mdx Outdated
}
```

`BusinessProfile` is `#[non_exhaustive]`. Field reads are unaffected; only exhaustive struct destructuring from outside the crate requires adding `..`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include construction in non_exhaustive guidance

For downstream crates, #[non_exhaustive] also forbids constructing BusinessProfile with struct-literal syntax; .. only fixes destructuring patterns. This wording says destructuring is the only affected operation, so users who previously built these public structs may follow incomplete migration guidance. The same newly added wording appears on the other response/result type notes and should mention external struct-literal construction as well.

Useful? React with 👍 / 👎.

@mintlify

mintlify Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
whatsapp-rust 🟢 Ready View Preview Jun 9, 2026, 2:10 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Per review feedback, "only exhaustive struct destructuring" was inaccurate —
struct-literal construction from outside the crate is also disallowed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fcf9900766

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread api/send.mdx Outdated
}
```

`SendResult` is `#[non_exhaustive]`. Field reads are unaffected; only exhaustive struct destructuring from outside the crate requires adding `..`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include construction in remaining notes

Fresh evidence: after construction guidance was added elsewhere, this added note still says the only external impact is exhaustive destructuring, but Rust also rejects struct-literal construction of a #[non_exhaustive] struct outside its defining crate. Consumers who fabricate SendResult in tests or adapters will follow incomplete migration guidance; the same wording appears on the newly added CreateGroupResult, ParticipantChangeResponse, and UploadResponse notes and should include construction or avoid saying “only”.

Useful? React with 👍 / 👎.

@jlucaso1
jlucaso1 merged commit 2caf585 into main Jun 9, 2026
2 checks passed
@jlucaso1
jlucaso1 deleted the claude/eager-cerf-kqhigx branch June 9, 2026 23:53
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