Skip to content

chore(api): mark growable public response and spec types non_exhaustive#293

Merged
AlfioEmanueleFresta merged 1 commit into
masterfrom
chore/semver-non-exhaustive
Jun 21, 2026
Merged

chore(api): mark growable public response and spec types non_exhaustive#293
AlfioEmanueleFresta merged 1 commit into
masterfrom
chore/semver-non-exhaustive

Conversation

@AlfioEmanueleFresta

Copy link
Copy Markdown
Member

Marks the public types that model device responses and protocol data as non-exhaustive, so adding fields or variants after 1.0 does not break downstream code. Types that callers construct directly are left exhaustive to keep them ergonomic to build. This is groundwork for committing to a stable API.

@AlfioEmanueleFresta AlfioEmanueleFresta marked this pull request as ready for review June 20, 2026 14:26
Add #[non_exhaustive] to CTAP2 command, transport, attestation and
biometric enums plus the get-info, make-credential, get-assertion,
bio-enrollment, credential-management, client-pin and large-blobs
response structs so adding fields or variants stays backward
compatible. Seal the test-only dummy() constructors out of the public
API.
@AlfioEmanueleFresta AlfioEmanueleFresta force-pushed the chore/semver-non-exhaustive branch from de18547 to 660fdc9 Compare June 21, 2026 15:11
@AlfioEmanueleFresta AlfioEmanueleFresta merged commit ffa421c into master Jun 21, 2026
7 checks passed
@AlfioEmanueleFresta AlfioEmanueleFresta deleted the chore/semver-non-exhaustive branch June 21, 2026 15:11
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